For Loop to Update Each Item in a List

  • 17 August 2021
  • 2 replies
  • 223 views

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?

 

19249i2A4B783BABB625DC.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!

 


2 replies

Badge +12

@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?

Userlevel 1
Badge +8
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?

Reply