Hi,
Why cannot you do it as a list workflow? So that your list workflow checks if value of that specific choice field equals "imminent danger" and if yes - starts a task process?
Isn't that easier? If I am missing something, maybe you could attach a print-screen of your form?
Regards,
Tomasz
Thomaz is correct. What you would want to do at the list workflow level is have your workflow on a conditional start where the column = imminent danger. Then In your workflow, you can do a query list to get the on-site person who you then need to start a task process, you can also custimize the task form to show the same data as the intake form if you need to show what items have the imminent danger selection based on rules on the controls.
if you needed a task for each option, you will have to set a collection var and loop through it or when you do the list query to get the on-site person you will have to build a string or collection of people and assign a task to all of them.
Hope some of these ideas help.
Thank you both. Very helpful and the conditional start will work. But I'm still stuck on how to loop through the columns to pull out just the columns that have been marked as imminent danger. I need this so I can populate an email notification, as an email will go out to additional folks who aren't assigned the task, so the task form rules alone wouldn't be sufficient.
Can you provide some more information on the design of your data structure and form design? I cantc imagine what it looks like. Please attach at least the form design screenshot.
Regards,
Tomasz
Sure thing. The start of the form looks like this.
The form goes on in sections like this. It's connected to an SP Online list that is primarirly choice columns. There are dozens of questions/columns. For any of the questions that contain the choice option "Imminent Danger", I want to be able to search for it, pull out the question if it was marked "Imminent Danger" and use it in an email notification to alert the recipients to that specific item that was causing imminent danger.
Apologies if this is confusing, it's much harder to articulate in type than when it's in my head.
Quick question - are all of these option questions mapped to SharePoint columns, or are they exist only in the form?
Regards
Ok, now it's clear. So now as I know they are mapped, I also know, that their number is fixed. You know how many fields should be checked for having a value "imminent danger".
Now you can do it in many ways. First, with conditional start - you set a sequence of checks, for each column that may have this value set, checking if it is equal that value:
- You have to built a separate "OR" rule per each field you expect to have value: "imminent danger"
- Add new sibling branches and set their relation to "Or"
Therefore your workflow will only start if in any of these monitored fields you have "imminent danger" value.
After workflow is started you need to check which of these fields have this value. You can do it either by checking each field separately, e.g. by adding multiple "Run if" actions, each action having a rule, checking if that field's value is "imminent danger":
And then "if yes", then by adding e.g. to a string variable name of the question, so that later this variable you can use in your task action, so the assignee will know in which questions initiator chose the "danger" value.
You can put those "Run if" actions one after another, or using "Parallel branch" action:
I am also thinking of a more clever way, that allows to save some precious actions, that is requiring a loop and collections, but I think this approach is just enough and a good start for what you need.
Regards,
Tomasz
Thank you for the help Tomasz. This will work perfectly.