cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
USERMD
Frequent Visitor

How can I create a flow which allows me to create an item using data from another SharePoint list ?

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.

2 REPLIES 2
Caspar_Rubin
Solution Supplier
Solution Supplier

Hey,

 

you could do it like this:

 

Full Flow:

 

Caspar_Rubin_0-1666809818693.png

 

Explanation:

 

My MS Form:

Just a placeholder field to trigger the flow...

Caspar_Rubin_1-1666809853983.png

 

My SharePoint List A: 

User is a Person (People Picker) Column, ValueX is a simple Text Column.

 

Caspar_Rubin_3-1666809899730.png

 

My SharePoint List B:

it's empty for the moment

 

Caspar_Rubin_4-1666809918959.png

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.

 

Caspar_Rubin_6-1666810142015.png

 

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.

 

Caspar_Rubin_7-1666810210587.png

 

 

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.

 

Caspar_Rubin_9-1666810372849.png

 

 

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.

 

Caspar_Rubin_10-1666810449693.png

 

Check

 

When I submit a Form Response with my Admin User the flow runs successfully:

 

Caspar_Rubin_11-1666810514391.png

 

List B then has a new item with the expected Valuex DEF from List A of the (Adm) User Row:

 

Caspar_Rubin_12-1666810590746.png

 

 

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:

Annotation 2022-10-27 140533.png
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?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,914)