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

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

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
dynamicsedge Power Participant
Power Participant

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

@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).

mibi
Frequent Visitor

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

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.

mibi
Frequent Visitor

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

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

Dual Super User
Dual Super User

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

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

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

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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