Need help with pulling back data from a SPO list to a task form.
I have a workflow that checks a SPO list and anything that is older than 3 days from a date column is then sent a task from to the email address associated to that item.
I then send a task from to that user and I want to pre populate that task from with the current data in the list for that specific item.
The problem I have is it will only allow me to select the current item data as per below. Does anyone know how I get round this please?
Thanks
Best answer by Garrett
Hi @Andy.Emery
Make the following changes.
Query List → no changes
In the Loop for Each. Specify “SPO Query → Item ID(s)” as the input (Target Collection) This will just return the Item ID and not the full row details.
In order to retrieve the row detail, use a “Retrieve an Item” action. Input is “Current Item”. Remember to set the Output variable name e.g. “SPO Retrieve Item”
Now you should be able to use the value directly instead of saving it to a variable first. “SPO Retrieve Item → <field name>”
I dont get the loop for each option. I query the list outside of the loop because I then have branch by condition of choosing the items with a particular date. I then assign the task but that is a problem as it stops the workflow until that first item has been completed which wont work for what I want to do. So I dont think this will work for my intended purpose
No it only shows the option for Queried list>First item as in my first image at the top as that action is inside the loop. The only way I could see how I get round it was to create variable and as the variable to the form field.
But even then the workflow will pause when it has assigned the task tot he first item that meets the condition until that has been completed but that does not meet the requirements of the use of the workflow so not sure how I can get round it
In the Loop for Each. Specify “SPO Query → Item ID(s)” as the input (Target Collection) This will just return the Item ID and not the full row details.
In order to retrieve the row detail, use a “Retrieve an Item” action. Input is “Current Item”. Remember to set the Output variable name e.g. “SPO Retrieve Item”
Now you should be able to use the value directly instead of saving it to a variable first. “SPO Retrieve Item → <field name>”
So just made the changes, and while its now much easier to put the form variables in the task form it still waits for the first item to complete the task before it moves tot he next item :(
aha! Now I see the reason for placing the Assign Task into a Component Workflow as it needs to run concurrently. You seem to know your scenario better
The Primary Workflow will just query the list searching for rows which meets a specific condition (Last Updated is more that 3 days)
When row matches the condition, Primary workflow will call a Component Workflow passing the Item ID as one of the parameters.
The Primary Workflow ends once all the rows has been processed.
Component Workflow will retrieve the row details (using the Item ID) and perform the Assign Task. It will update back the row with newer data from the Task Assign form using the Update Items action. Remember to set the condition for the Update Items → ID equals an integer <item ID>. otherwise the entire list get updated.