rookie
Novice

For Loop to Update Each Item in a List

All,

I need to run a workflow one time to iterate through all items in a list and update one column in every item. I am simply trying to copy the value from a calculated column (which returns currency) to another column of type currency. (I apparently have to do this in order to be able to sum the column using SharePoint's group and sum features.) My user wants to be able to see the sum of the column.

 

The For Each loop seems to be working correctly. I am storing the Item IDs in a collection and looping through the collection. However I keep getting the "Coercion Failed: Unable to transform the input lookup data into the requested type." error. 

 

Here is my Update Item within the loop. Could you please tell me if I've got this wrong?

 

rookie_1-1629152625592.png

It I get rid of the loop and just trigger the workflow on item edit, it works. But the list is too large to update one item at a time.

 

Thanks!

 

0 Kudos
Reply
2 Replies
kunalpatel
Collaborator

Re: For Loop to Update Each Item in a List

@rookie instead of using the value from a calculated column, can you try to replicate the formula in the workflow and use that variable to update the currency column?

0 Kudos
Reply
bgarvey
Apprentice

Re: For Loop to Update Each Item in a List

Perhaps you have some calculations that do not return a value? As part of your Run if can you check that the calculated value exists or is a number?
0 Kudos
Reply