Filter(CCB, Filter.Text in 'Requirement Source')
This is the statement I have in the gallery. I first want it to filter by a text filter. Then I want to be able to filter it by a drop down menu. How do I add this to the existing filter statement?
Solved! Go to Solution.
So I think we finally got it haha - if the dropdown doesn't have a default value then we will need to create logic to handle the empty dropdown otherwise it is always going to check for that. We could put this in the Filter but then it is not-delegable so we need to put it outside the Filter().
If( IsBlank(Dropdown1.SelectedText.Value), Filter( CCB, StartsWith('Requirement Source',Filter.Text) ), Filter( CCB, StartsWith('Requirement Source',Filter.Text), 'Functional Area' in Dropdown1.SelectedText.Value ) )
You need to switch your 'in' expressions since you are trying to say Filter CCB where 'Requirement Source' value is in the string "...". As well depending on the type of text filter you are trying to apply (and whether or not you are concerned w/ Delegation) I'd take two routes.
// -- Option 1 Filter( CCB, 'Requirement Source' in TextInput.Text, 'Requirement Source' in Dropdown1.SelectedText.Value ) // -- Option 2 Filter( Search( CCB, TextInput.Text, "Requirement Source (internal name in double quotes)" ), 'Requirement Source' in Dropdown1.SelectedText.Value )
@powerapps890 apologize please update "TextInput.Text" and "Dropdown1.SelectedText.Value" to be "Filter.Text" which is the component in your PowerApp. Otherwise replace them both with empty stings (two double quotes "") and the errors will go away for the time being.
It says the search function is having issues. It filters in the filter text box first by req source then in the dropdown by functional area.
That is a "Delegation" warning which doesn't necessarily mean it's having issues but if this dataset is on SharePoint and is expected to be large we will have to use something other than Search(). In that case we have to fallback to the following:
Filter( 'Template Approvers', StartsWith('Requirement Source',Filter.Text), 'Functional Area' in Dropdown1.SelectedText.Value )
Sorry I was sloppy in writing that last response and messed up the source property of the Filter() function. It should be updated to:
Filter( CCB, StartsWith('Requirement Source',Filter.Text), 'Functional Area' in Dropdown1.SelectedText.Value )
If it doesn't work, please take a photo again as that helped me understand what was erroring.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights