cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
karlagb20
Helper III
Helper III

Create item from list 1 to list 2 and update if needed

Hello I'm new to flow and I have 2 lists

 

List Projects

List NCSA

 

When I add an item to list Projectss  with the location field as "NCSA" I would like for it to automatically create item to list NCSA only if it has location as NCSA. If it doesn't then I want it to ignore it.

 

I also want the item in list B to update everytime a change is made in list A. Please help step by step how to make this flow and provide how it looks if possible. This is what I have so far. Thank you!

flow.PNG

4 REPLIES 4
Gristy
Resident Rockstar
Resident Rockstar

Your trigger is correct.

Click on the ... and then Settings for the Trigger and set a condition action

 

@equals(triggerBody()?['Area_x0020_Value'],'NCSA')

 

Annotation 2019-08-22 094759.png

 

This will make sure the flow only runs when that value is = NCSA.

 

Add a condition that compares Created and Modified - if they match then it is a new item and you should create a item in List B.

 

If they do not match then you need to query List B for the Item's ID and then do an update item.

 

Your flow will look something like this (The Update item will end up in a apply to each loop):

 

Annotation 2019-08-22 095138.png

 

On the NCSA List make sure you have a column such as ProjectID that is populated with the ID of the Project to ensure you know what relates to what.

 

Then on the "Get Items" action you would query the NCSA List with the ODATA Filter query like this:

 

ProjectID eq '@{triggerBody()?['ID']}'

It doesn't work. I only want it to update the NCSA ones from list Projects as wella as create items into list NCSA everytime someone adds an item to list projects selecting NCSA as the area. 

manuelstgomes
Super User II
Super User II

@karlagb20 please check your other post

 

https://powerusers.microsoft.com/t5/General-Flow-Discussion/HELP-list-A-to-list-B-and-update-list-B-...

 

I wrote a detailed answer that can help you. 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Gristy
Resident Rockstar
Resident Rockstar

Hi Karla my description and example does exactly what you are after.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,529)