cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

UpdateIf with a listbox

Hi All,

 

I have got a record updating if there is a matching record in a table, but I am actually looking at doing the opposite to this. If it finds the item in the table it updates all the other records. My code works to update the record, so what is the opposite to in? I tried NOT but that doesn't work.

 

ForAll(Gallery1.AllItems,
UpdateIf(Mapping, crb20_item in ListBox4.SelectedItemsText.Value, {cr330_item_order: cr330_item_order + 2 }));

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Hi,

Can you try something like this?

ForAll(Gallery1.AllItems,
UpdateIf(Mapping, !(crb20_item in ListBox4.SelectedItemsText.Value), {cr330_item_order: cr330_item_order + 2 }));

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

View solution in original post

3 REPLIES 3
Highlighted
Super User II
Super User II

Hi,

Can you try something like this?

ForAll(Gallery1.AllItems,
UpdateIf(Mapping, !(crb20_item in ListBox4.SelectedItemsText.Value), {cr330_item_order: cr330_item_order + 2 }));

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

View solution in original post

Highlighted

Perfect!

 

Thank you 🙂

Highlighted

Glad I could help!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,673)