I’m running into a problem, I need to loop through all items in a list, and when a certain condition is true (a yes/no column will have the value “yes”), I need to do a calculation.
I have the calculation in place, the conditions are in place, even a (reusable) workflow on a single item works, but my client would like to have one button in the ribbon which he can click and then the workflow will go trough all items in the list.
Please help! Thanks
PS: working with O365 and SP Designer
If you are creating the ribbon button using SPD, you’ll need to have a workflow that is capable of collecting all of the list items and either running the existing workflow on them or performing the actions of said workflow. This could be done with a 2013 workflow that uses Call HTTP Web Service action to collect the list of items and then loops based on the count in the returned dictionary. This link contains a sample to follow.
For the ribbon button itself, this link by Drew Madelung can point you in the direction of setting that one up to kick of the workflow created above.