Hi all,
I am trying to set a flow which does the following
The flow gets the response details from an MS form when it is submitted.
I want it to query an existing SharePoint list to get a certain value (x) -
The existing list has a people picker field - I want the flow to use the responders email from the MS form and match it to this so it gets the right row and then gets the value (x) for that row
I then want to use the value (x) to create another item on a different SharePoint list
I am having trouble with the middle step - struggling with how to get the flow to query the existing SharePoint list and return the value I want.
Relatively new to flows - any help would be much appreciated, thanks.
Hey,
you could do it like this:
Full Flow:
Explanation:
My MS Form:
Just a placeholder field to trigger the flow...
My SharePoint List A:
User is a Person (People Picker) Column, ValueX is a simple Text Column.
My SharePoint List B:
it's empty for the moment
Now the flow:
First we trigger the flow When a new response is submitted and get all the Data using the Get response details action using the Dynamic content Response Id from the trigger.
After that, use a Get items action to get all items from the SharePoint List A.
Then, add an Apply to each action and use the Dynamic content value from the Get items action in the Select an output from previous steps field.
Inside the Apply to each action, add a Condition action.
On the left side, select the Dynamic content User Email from the Get items action.
The operator in the middle should be is equal to.
on the right side, select the Dynamic content Responder's Email from the Get response details action.
In the left If yes section of the Condition action, simply add a Create item action and point it towards List B.
You can then use the Dynamic content ValueX there.
Check
When I submit a Form Response with my Admin User the flow runs successfully:
List B then has a new item with the expected Valuex DEF from List A of the (Adm) User Row:
let us know if this works for you, cheers,
caspar
Hi,
Thank you for your reply.
I managed to make it work using filter query in the get items section. Like so:
Now I need the same flow to get the same value but for a different email address which will also be submitted in the same form and will go on to the second SharePoint list. Is there a way to kind of save the first get item and refer to it and then get the second one and refer to that, and then use them both when creating a new item?
User | Count |
---|---|
85 | |
38 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
48 | |
46 | |
27 | |
25 |