cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
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!

Highlighted
Super User
Super User

Re: Update collection based on values of another collection

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

Highlighted
Skilled Sharer
Skilled Sharer

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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