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
Yes, and the KPI is a number (in a column) that should be increased by the workflow.
So, the tasks are action items to be completed by the next meeting. If they are not, he wants a KPI to show that?
Sorry if I’m being unclear. I’ll give it a try to explain it better 🙂
I have a list with Tasks, those are actions from a meeting. Actions are open or closed (ofcourse). The client would like to flag open actions after the due date, even better, he would like to monitor how long the action is open after due date. The “how long” part is not set by time, but set when the next meeting takes places. Therefor, instead of some automatic workflow that runs every now and then, he would like to have a workflow that he can start himself.
So I have an action (task) that is passed due, the next meeting takes place, the workflow should set the KPI to 1. After the next meeting, when the action is still not done, the workflow should set the KPI to 2.
The client doesn’t want to go through a long list of items and fire workflows one by one (understandable, right?). So he wants a workflow that goes through every item in the list, and when due date is passed, calculate the KPI + 1
I’ve already given him the option that he can set a value to yes which will start a list workflow that will do the calculation, but he knows that his colleagues won’t do that. Therefor he asks for a single button that will do the trick on the complete list.
I hope this explanation makes it any clearer….
I’m having a hard time following what you’re trying to do. To get the count, you can use Call HTTP Web Service action to make a CAML query on the list for all of the items that meet your requirements (passed since an action is due.) This will return a dictionary of said items. There is a workflow action that will count the number of items in the dictionary, so that would be your count.
The looping part I get, still not sure where I can view the output, but that is not so important right now.
Creating a ribbon button, I’ve managed that before, so no prob.
What is puzzling me, is that I have a list on a site (Task List), and I need to update a value. The client counts the number of meetings that have been passed by since an action is due. So first meeting after action is due and action is still open: 1.
When during next meeting action is still open: 2.
The calculation of this part: got it, no prob.
However, how to get this calculation into a site workflow….. And how will the site workflow update the specific column on a specific item (only passed due dates) in that specific list?