formData.getAdditionalValues
(FintechOS Studio 20.1.1 and later)
Reads all objects that were defined in preceding form steps using formData.setAdditionalValue.
Syntax
Return Value
Returns an array of JSON objects containing all the objects' names and values.
For example:
Copy
[
{ Attribute: "start", Value: Date Thu Oct 22 2020 20:00:39 GMT+0300 (Eastern European Summer Time) },
{ Attribute: "value1", Value: "666, the number of the Beast" },
{ Attribute: "value2", Value: logContent(callbackContent) }
]
Examples
In this example:
- We create an empty array called listOfAttributes.
- We iterate over each additional value that has been defined and add it's Attribute name to the list.
- If the myAttribute additional value has been set, we log the Found it. message in the browser console.
Copy
let listOfAttributes = new Array;
formData.getAdditionalValues().forEach(addToList);
function addToList(value){
listOfAttributes.push(value.Attribute)
};
if (listOfAttributes.includes('myAttribute')){
console.log('Found it.')