cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BarbaraSelden
Level: Powered On

dynamically select item ID to update item, or create condition to specify item number

I have a source list used for lookups in a sign up list for volunteers,  

Source list contains ID, several fileds for look up, and a field called AVAILABLE which is by default yes.

 

Let's call these SourceLIstID and SourceListAvailable

 

In the volunteer list, users select an opportunity form the source list, and I capture SourceListID in a field called MasterID.  so MasterID = SourcelistID

 

Once SourceList item is chosen in the volunteer list, i want to set AVAILABLE to NO for that item in the SourceList. 

Since i have the item id of the item in the source list, i want to se up a flow that does the following:

 

Update item where SourceListID = VolunteerListMasterID, and change SourceListAvaialble to No

 

So, this would be easy if i could dynamically choose the item ID, which doesn't appear possible, so i need a condition that specifies the item to be updated, and i am stumped.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: dynamically select item ID to update item, or create condition to specify item number

This may solve your problem.

 

I created a list called Volunteer with a lookup to a list called Source.  The lookup column is called Opportunity.

When I create an item in Volunteer, my Flow runs and selects the row in the Source list where the ID is equal to the Opportunity Id.

SharePoint actually stores the ID of the item in the lookup list and it is exposed in Dynamic properties (Opportunity Id).

 

Screen shots are below.

 

UpdateLU1.jpgUpdateLU2.jpg

 

If this solves your issue, please mark your question as Resolved.

 

If this does not resolve your issue, please provide additional detail.

 

Scott

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

Scott

View solution in original post

6 REPLIES 6
Super User
Super User

Re: dynamically select item ID to update item, or create condition to specify item number

This may solve your problem.

 

I created a list called Volunteer with a lookup to a list called Source.  The lookup column is called Opportunity.

When I create an item in Volunteer, my Flow runs and selects the row in the Source list where the ID is equal to the Opportunity Id.

SharePoint actually stores the ID of the item in the lookup list and it is exposed in Dynamic properties (Opportunity Id).

 

Screen shots are below.

 

UpdateLU1.jpgUpdateLU2.jpg

 

If this solves your issue, please mark your question as Resolved.

 

If this does not resolve your issue, please provide additional detail.

 

Scott

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

Scott

View solution in original post

BarbaraSelden
Level: Powered On

Re: dynamically select item ID to update item, or create condition to specify item numbertting the I

This is helpful. However, however it is updating the items with the wrong ids.

For example, i chose opportunity with Source ID 2 in the volunteer list, the flow updated the Source item with Id 23.Any ideas?

Super User
Super User

Re: dynamically select item ID to update item, or create condition to specify item numbertting the I

Please post a screen shot of your Flow and I will try to assist.

 

Scott

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

Scott
BarbaraSelden
Level: Powered On

Re: dynamically select item ID to update item, or create condition to specify item numbertting the I

Thanks so much. Before updating as you describe above, the flows indicated success, but were updating the worng item

dg-wrong item.PNGOnce i updated it to include the get items which triggered the "apply to each", it just fails altogether at the "apply to each" step.

Note: Source list is called AMster.

MAster ID is the field in the volunteer list that captures the source list item's id. 

DG-wf.PNG

BarbaraSelden
Level: Powered On

Re: dynamically select item ID to update item, or create condition to specify item number

Scott's solution is correct. However, initially in the update item ID, i had only one choice (which said "ID" and trurned out to be the Id of the secondary list's item); after deleting and recreating, i had two choices--one for "when item created" step, and one for "get items" step. the second is the one i needed.

 

I believe the second and necessary didn't show because the "get items" step was inserted later than the "update items step".

 

HelplessMax
Level: Powered On

Re: dynamically select item ID to update item, or create condition to specify item number

@ScottShearer you are on true legend !!!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 201 members 4,383 guests
Please welcome our newest community members: