Signed in as:
filler@godaddy.com
Signed in as:
filler@godaddy.com
This is a niche problem in Power Apps that may be rare but definitely has its place. Imagine we have a collection of data like so:
Now let's say we want to find records that contain "Apple". This is simple - we can just write the following:
The complexity comes in when we want to find records that contain any of a number of selected values. This could be where the user has selected multiple fruits in a Combo Box and we want to show any records where either of those fruits are present. The following can be used to solve this:
What this code does is creates a string of Yes and No values for every record, made up by splitting the Fruits values and comparing with the selected values in the Combo Box. These are concatenated back to a single string, and we can check for the presence of a "Yes" in that string. If found, that record is returned by the filter expression.
This solution avoids having to use OnChange or OnSelect events, or creating intermediate collections to slice and dice the data. The results should be near-instantaneous.
Hopefully this helps if you have run into this problem before. Note, this will likely lead to delegation issues if used against a datasource, so try and have the data imported before using this method.