- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 03:45 AM
Hi!
I have not been able to solve this problem for a long time and would like to know if you can help me.
I made custom Action for the purpose of converting Record type Input to Array.Object Output.
I think I may have succeed to comma-separate the Input and process it so that it goes into an Array.Object type.
But I couldn't get the Record`s variable and the test says [undenied][undenied][undenied]...
Input value "records" refers "Table contains list column", and "Table contains list column" have List variable "u_list_test_column".
And the "u_list_test_column" refers 3 Strings from Table "Table contains string colummn".
If you know of a script that can take variables from the records, I would be glad to know.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 10:38 PM
I could convert List type to Object.Array by making new Action.
Here`s script. Eureka!
(function execute(inputs, outputs) {
//Create an empty array
var valueinfoArray = [];
var i = 0;
//Iterate through the list of User records
while(inputs.records.next()) {
//Create an empty object for each iteration
var contactObject = {};
//Query User records to assign object values
contactObject.string1 = inputs.records.getValue('u_string1');
contactObject.string2 = inputs.records.getValue('u_string2');
contactObject.string3 = inputs.records.getValue('u_string3');
//Add current object to array
valueinfoArray[i] = contactObject;
i += 1;
}
outputs.valueinfo = valueinfoArray;
})(inputs, outputs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 10:38 PM
I could convert List type to Object.Array by making new Action.
Here`s script. Eureka!
(function execute(inputs, outputs) {
//Create an empty array
var valueinfoArray = [];
var i = 0;
//Iterate through the list of User records
while(inputs.records.next()) {
//Create an empty object for each iteration
var contactObject = {};
//Query User records to assign object values
contactObject.string1 = inputs.records.getValue('u_string1');
contactObject.string2 = inputs.records.getValue('u_string2');
contactObject.string3 = inputs.records.getValue('u_string3');
//Add current object to array
valueinfoArray[i] = contactObject;
i += 1;
}
outputs.valueinfo = valueinfoArray;
})(inputs, outputs);