cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Super User III
Super User III

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
Highlighted
Super User III
Super User III

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

Highlighted
Regular Visitor

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?

Highlighted
Super User III
Super User III

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
Highlighted
Regular Visitor

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

Highlighted
Regular Visitor

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".

 

Highlighted
Helper I
Helper I

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

@ScottShearer you are on true legend !!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,058)