Reference table data in script
Hello,
I have a situation where I have a complex function (such as changing a Letter grade to a GPA) in a auto-filled table. Doing this with built-in steps would be cumbersome. I am able to reference the Table Data, but I am not able to find a way to reference the current row number dynamically within the script. Is there a certain way to reference this?
For example this would give me the 1st or 0 row in a table for the GPA key: tableName[0].GPA.
The '0' is where the dynamic reference to the current row number should be.
Answers (2)
Hello Michael,
I assume you are attempting this in an iPaaS flow, yes?
Can you provide the name of the flow you're attempting this in? and from which step of the flow?
Sincerely,
Mark Sayers
Sr Support Consultant, CS
(currently the script is in the design clipboard) - Michael Leys Wed 3/20/24 3:11 PM
const letterGrade = fileData_NRCCUAAOS[lead-1].GPA;
lead is the variable of the for loop starting at 1. Need to subtract 1 as jscript starts indexing at 0 - Mark Sayers Thu 3/21/24 9:14 AM
Can you put the current row number into a flow variable, and then use that?