cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KickingApps
Level 8

Update collection based on values of another collection

Seeking help updating a collection based on values of another collection.  So, I have 
colVehicles (glrVehicles)                     colReservations  (glrReservations)                                               

vehNumber                                         vehicleNumber

isAvailable  (T/F)                                    

**The above collections have additional columns but were not referenced here as they are not relevant

 

I need to updat colVehicles.isAvailabe to false if  vehNumber <>  vehicleNumber in colReservations table.

colVehicles will only have the vehNumber once, but will likely have 3-5 records. The same vehicle number could appear in the colReservations table multiple times.

If it appears in the colReservations table at least once, then isAvailable should be false.  The colReservations table could have many records. 

@timl @RandyHayes @wyotim 

Thanks, in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Update collection based on values of another collection

@KickingApps 

How about something like this:

 

UpdateIf(colVehicles, !(vehNumber in colReservations), {isAvailable: false})

That should get you what you need..

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Update collection based on values of another collection

@KickingApps 

How about something like this:

 

UpdateIf(colVehicles, !(vehNumber in colReservations), {isAvailable: false})

That should get you what you need..

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Super User
Super User

Re: Update collection based on values of another collection

@KickingApps

I agree that @RandyHayes's formula should do the trick. If not, post back here!

Super User
Super User

Re: Update collection based on values of another collection

Late to the party, but @RandyHayes seems to have it covered! 

KickingApps
Level 8

Re: Update collection based on values of another collection

Not sure why I couldn't come up with that - but works like a charm!  Thank you; you all are awesome!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,946)