Update Item in List by Index
  • 10 Nov 2023
  • 1 Minute to read
  • Dark
    Light

Update Item in List by Index

  • Dark
    Light

Article summary

Step Details
Introduced in Version8.10.0
Last Modified in Version8.10.0
LocationData > List 

Update Item in List by Index step allows users to map new values into properties of an item in a list without the need to remove and read the item. This reduces the number of steps needed for making changes to list items. Useful steps to pair it with include the Index of Item In List to determine the index of items in the list.


Properties

Data

PropertyDescriptionData Type
List TypeAllows to configure the list data type.--
Item Indexspecify the Item Index that is to be replaced from the list. The Item of that Index number from the list will be replaced by an Item to Update.
Note: The lists start with an index of 0 for the first item.
Integer

Inputs

PropertyDescriptionData Type
Item To UpdateThe update for the item. The index of the item needs to be entered under Data > Item Index.String
Original ListThe list containing the desired itemList of String

Outputs

PropertyDescriptionData Type
Updated ListThe list with the new changeList of String


Common Errors

Exception Message:  Error running step Update Item In List By Index 1 

Users might face this issue when there is only one entity within the list item, and the Item Index specified is one.

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Update Item In List By Index 1[UpdateItemInListByIndexStep] in flow [Flow 1]: Something went wrong, either the Original List has not been initialized or the Index To Update is out of range. ---> System.Exception: Something went wrong, either the Original List has not been initialized or the Index To Update is out of range. at DecisionsFramework.Design.Flow.CoreSteps.UpdateItemInListByIndexStep.Run(StepStartData data) at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData) at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace ----



Was this article helpful?