Hello. I'm trying to build a search function, and here are the input fields. The only ones that matter in this issue I'm facing now are Seat ID, Audit ID, Build Event and Incomplete Audits Only (boolean).
What I'm trying to do is set up a filter so it only does filters on these input fields that have value. For example, if Seat ID and Audit ID are the only ones with value then I want to do a filter using only them. So if somebody only has Build Event filled out, then I only want to apply a filter on that field and forget the rest. So essentially, filter this entity where build event is equal to what was put into the build event combo box. All the other fields are not filtered on.
This was my attempt. I tried to store my entity in a variable and then filter than variable in sequence depending on which input fields had value.
The issue with this was my lookup fields would not longer work or display in the gallery I'm going to be applying this filter to so I decided I couldn't use a variable.
Does anyone know a way to set this up so I don't have to essentially create a ton of if statements? Thank you.
Solved! Go to Solution.
You could try and use the filter function with Boolean logical function such as described here: https://docs.microsoft.com/pt-pt/powerapps/maker/canvas-apps/functions/operators
An example of this can also be found in the Filter function documentation which uses the following formula:
Filter( Customers, SearchInput.Text in Name || SearchInput.Text in Company )
The result of this function is that it filters the Customers data source for records in which either the Name column or the Company column contains the search string anywhere in the given columns.
Hope this helps you in any way!
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT