Reference value assignment
Last updated
Was this helpful?
Last updated
Was this helpful?
Reference values are the response data generated as results when running a test. This data can be used like a variable in the next app in the way the user desires.
When you click the 'Test with 1 data' button on the right side of the Dataflow design window, it executes a single piece of data (or record).
After running the test and clicking on an input field, the auto-input feature appears as shown below.
Depending on the execution results of each task, the variable value setting type may differ based on whether it is an array or not. The following is an explanation for advanced users.
Example Data:
Reference Example:
Result:
If the variable value is an array, you can directly use the objects inside the array.
When you enter a key from the object within the array as the result, it will automatically iterate through the array and utilize each value.
If you use an array-type result as input for another app, the app will automatically execute repeatedly once for each item in the array.
Only one-dimensional arrays are supported. Nested arrays are not supported. A nested array refers to a case where an array contains another array inside it.
Example Datas:
Reference Example:
Result:
When referencing arrays from multiple apps, the execution is limited to the length of the shorter array.
Example A:
Example B:
Reference Example:
Result:
Each task returns the original data from the App as-is. However, situations may arise where the task data needs to be transformed to properly handle the data flow. For such cases, we provide a JavaScript task that allows you to transform the data and reference the transformed result.
Example A:
Example of usage in JavaScript:
Result:
When using a reference value that is an array in JavaScript, the entire array is passed. This allows you to either aggregate the contents of the array or access each index individually.
Example B:
Example of usage in JavaScript:
Result: