replied on October 4, 2018
Updating multivalue fields can be a bit tricky when you want to change a specific value in the collection. You could try the following:
- Create a new empty multivalue token in your workflow (something like NewValues)
- Retrieve the multivalue field (set it to All Values)
- Iterate the values using a for each value (under Values select the YourToken_All value from the retrieve field values activity)
- Add a two-branch condition
- If ForEach_Iteration = Your target value
- Append the new value to %(NewValues)
- Else,
- Append the %(ForEach_CurrentValue)
- Add a Set Field Values, and Replace the current values with the %(NewValues) token
What this does is build a new list of values, in the same order, that only replaces the target value. Then, that new list overwrites the old list allowing you to change a specific value.
You may need to account for the unexpected, for example, if the process is trying to update the 4th value but there are only 3 current values.