Skip to main content
ashlinfelixr583143
April 11, 2025
Solved

Update List of values

  • April 11, 2025
  • 3 replies
  • 0 views

Hi team,

   I have written a expression rule to update a particular row of a record. The Expression rule is working as expected while unit testing but does not work when called in Script task.Could someone please help?

    Best answer by zakarym8213

    "Invalid index (1) for list: valid range is empty..." leads me to believe that for some reason local!leaveData is an empty list

    3 replies

    mikes0011
    Brainy
    April 11, 2025

    My first guess is because local!leaveData is a list of record, and you're calling a!update() as if it's a single instance of that record type data.  To test this, change line 5 to "  data: local!leaveData[1]" and see if it makes any difference.

    April 11, 2025

    "Invalid index (1) for list: valid range is empty..." leads me to believe that for some reason local!leaveData is an empty list

    mikes0011
    Brainy
    April 11, 2025
    leads me to believe that for some reason local!leaveData is an empty list

    What do you see when you expand the Local Variables viewer pane and see what the actual data type / content of that local variable is?