cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Skilled Sharer
Skilled Sharer

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

@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.
Check out my PowerApps Videos too!

View solution in original post

4 REPLIES 4
Super User III
Super User III

@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.
Check out my PowerApps Videos too!

View solution in original post

@KickingApps

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

Resident Rockstar
Resident Rockstar

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

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

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,713)