I have trouble configuring Run if on a site workflow
I am working on task reminder ( site workflow)
please see attached
I want the workflow to run when items are active and then calculate the date and send an email accordingly.
but, the current workflow ignores run if active = "yes" and sends emails for every item.
By the way I tried the workflow from this thread too https://community.nintex.com/thread/10928
Any help much appreciated!!!
Solved! Go to Solution.
"Yes" is always equal to "yes", so no surprise it sends notification for each item
I believe workflow designed as follow with work for you
- first make query list for all active items. let the query list action return all the fields that you will need to control your workflow logic and send in notification. save each such field into separate collection variable
- set up for each loop on one of the collections. within the loop perform you date calculation, notification content preparation, and possibly send notification (if you want it to send for each item)
Thank you for the quick reply.
I followed your suggestion please see the attached.
I queried the list before I used run if..
some how this workflow is not giving me desired output ( running in the loop I guess)
really confused with two for each loops.
Please let me know where I am doing wrong,
any help much appreciated!!!
Thank you in Advance!!!
- you do not need run if action any more to check if item is active or not. (first) query list action returns you ONLY active items.
- configure (first) query list action so that it returns as well 'Contract End Date' field,and all the the fields you query with the second query list action. let it store each into another collection.
then you will not need second loop and query list action at all.
- configure for each loop so that it store Index value into a variable. with that index variable you will then access elements in other collections at the same position (ie. values of the same item)
- with run if action check 'Contract End Date' against your calculated date. if they meet the required condition, then send notification.
Note that contract end dates will be stored in collection in ISO string format like YYYYMMDDTHH:MISZ, so store your calculated date as well ISO string format, so that it is comparable to value in collection.