@youlearn ....query your list and apply filter where Approved = No, get the IDs and store them in a collection variable, using For Loop, ID collection variable, perform your logic.
Hello Kunalpatel,
I have figured that part but facing other issue.
In my list workflow I have a column State and Approver (email address).
In my site workflow I am able to filter based on Approved status is no but I am left with multiple items with different States and email address.
I am able to use collection operation filter these emails, check for duplicates.
I want to send Flexi Task to each of these emails based on the State and when approved I will run the list workflow and mark approved as Yes.
The challenge here is to run the Flexi Task in a loop and trigger List workflow which should mark Approved column as yes . And Flexi task should be assigned in such a way that item with State TX should only approve TX item.
@youlearn ...as mentioned earlier you need to use ID collection and not approvers collection. Try below steps:
- Query your list BUT filter it where Approved column value has "No"
- Get IDs, Approvers, State and store them in respective collection variable i.e. collec_IDs, collec_Approvers, collec_StatesFromList
- Create a number variable called it "num_Index"
- Also create the collection variable i.e. collec_States and store all your states while creating the collection (this is to dynamically run your workflow)
- Now using For Loop and collec_States, store it in slt_eachState
- Add another For Loop and use collec_IDs and store it in int_eachID and add num_Index to get the indexing of that ID
- Add collection operations --> Use collec_Approvers --> use num_Index and store it in slt_eachApprover
- Add another collection operations --> Use collec_StatesFromList --> use num_Index and store it in slt_eachStateFromList
- Add Run IF action and condition will be slt_eachState = slt_eachStateFromList
- In here you use add actions you need to perform
Also, just out of curiosity...why can't you run the workflow on list item which will assign task to your approvers? And if approvers approves the task then using update item changed the status as Approved or Approved as Yes.