cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mibi
Frequent Visitor

Filter Multi-select choice column has to be in same order as saved?

I seems that it matters in which order the Lookup field is set or the data are saved.

How can I ensure to receive the same result independent in which order the user is searching?

 

Both records have stored multiple Values. It should also show up if only for Example Aussendienst would be selected. In the current solution one record would disappear.

 

Thanks for Help in advance!

 

Bildschirmfoto 2020-01-13 um 21.10.21.png

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @mibi 

 

To configure this, you need to create a variable on the OnChange property of the combobox control as:
Combobox -> OnChange ->
Clear(MyCollection);ForAll(ComboBox2.SelectedItems.Value, Collect(MyCollection,Filter(KVP,Value in Umsetzung.Value && !(ID in MyCollection.ID))))

Gallery -> Items -> If(CountRows(Combobox2.SelectedItems) = 0, KVP, MyCollection)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

5 REPLIES 5
poweractivate
Super User II
Super User II

@mibi 

 

Use Sort for this.

 

You get a yellow triangle. Is it a delegation warning? If it is, it's recommended you do a different approach if you have more than 500 items (you can raise the non-delegable query limit to 2000, but 2000 is the highest - if you take a different approach, you won't have that limit).

Thanks for the hint,

 

I changed from

Filter(KVP; Concat(Umsetzung; Value & ";") in Concat(ComboBox2.SelectedItems; Value; ";"))

 

to 

Filter(KVP; SortByColumns(Concat(Umsetzung; Value & ";"); Umsetzung; Ascending) in SortByColumns(Concat(ComboBox2_2.SelectedItems; Value; ";"); Umsetzung; Ascending))

 

But the result remains wrong.

Do you have a hint how I should write the sort? An example based on what I posted? Thanks for any hint.

yashag2255
Dual Super User II
Dual Super User II

Hi @mibi 

 

To configure this, you need to create a variable on the OnChange property of the combobox control as:
Combobox -> OnChange ->
Clear(MyCollection);ForAll(ComboBox2.SelectedItems.Value, Collect(MyCollection,Filter(KVP,Value in Umsetzung.Value && !(ID in MyCollection.ID))))

Gallery -> Items -> If(CountRows(Combobox2.SelectedItems) = 0, KVP, MyCollection)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

mibi
Frequent Visitor

Thank you so much! It works perfect! Is there a way to view in the Gallery all Data if nothing is selected? It works, but first I Need to Change the Combobox to a value and then delete the Value in the Combobox and then it Displays all data. It reacts good OnChange, but I wanted to Display also all data just while loading the Form.

 

Do I have to paste this Code somewhere else too?

 

Combobox -> OnChange ->
Clear(MyCollection);ForAll(ComboBox2.SelectedItems.Value, Collect(MyCollection,Filter(KVP,Value in Umsetzung.Value && !(ID in MyCollection.ID))))

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (17,675)