cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamBasso
Helper I
Helper I

Issue Updating SharePoint List

Hi all

 

I am a newbie (and feeling it).  Just want to understand a couple raw basics that I am already hung up on.  

 

I am using two SharePoint Lists for my first test flow  (List X and List Y).

  • List X has two fields (Product Idea, L (cm).
  • List Y has two fields (Product Name, Length (cm).

I want the flow to;

  1. Create a record in List Y when a record in List X has been created.
  2. Amend a record in List Y when a record in List X has been modified (either of the two fields).

I have used the 'When an item is created or modified' trigger to kick off the flow.

The Create Item action seems to work OK but the Update Item action is not working.  I think this has something to do with the ID field that is unique to the Source list and the destination list being different (due possibly to doing a few tests on the flow by creating records in list X.)  

 

Seems like you don't/cannot populate the ID field in target list from source list in create action, whereas ID must be included in the update item action?   Bit confused about IDs here.

 

Also, for my understanding, Get Items specifies the target list, not the source list?  To my mind, when I get something, I am getting it from somewhere (a source)..... 

 

A picture paints a thousand words, so I have screenshotted the lists and flow below.  If anyone can point out my error, I would be so grateful.  I am sure they are obvious mistakes to most of you.

 

 

SamBasso_0-1593777175582.png

 

SamBasso_2-1593777274401.png

 

SamBasso_3-1593777333311.png

 

 

SamBasso_4-1593777508424.png

 

 

SamBasso_5-1593777523246.png

If I am missing anything let me know but would be grateful to get on the right path.

 

Thank you

 

Sam

2 REPLIES 2
SamBasso
Helper I
Helper I

Missed the screenshot after get items...

 

SamBasso_0-1593778753532.png

 

So basically, to get around the issue linking different SharePoint lists and the issue with ID fields I mentioned;

 

  • I created SourceID column in child list.  
  • Flow is triggered when an item is created or modified in Parent list.
  • I used a Filter Query in get items SourceID eq ' Identifier'.
  • Added a condition:  length(body('Get_items')?['value']) is equal to 0
  • If Yes then create item in child list.  (SourceID field is mapped to Identifier field in Parent list).   
  • If No then update item in child list.

 

Seems to work with no issues.  

Note there are different fields in child list - I only wanted some of the fields to be populated.

 

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Users online (1,154)