I have a gallery with different work items. I have already created a dropdown list that is connected to my gallery (the dropdown has different status of the current work items). I also want to filter on the specific tagg \Business Tracks\Make by default. so when I am at the page it shows only work items with the tagg Make and then I can filter by status (by choosing the right status in the dropdown list).
Solved! Go to Solution.
Hi @Djanan ,
If you use Dropdown control in your app, and set the Items property to Distinct(Tickets, Status), the Dropdown box would be populated with a default value (the first value from the Distinct(Tickets, Status) formula). If you use ComboBox in your app, the ComboBox would not auto-fill a default value.
Do you also want to filter your Gallery Items based on the Account Name value chosen manually (from a Dropdown box)? If you also want to filter your Gallery Items based on the Account Name value chosen manually, you could consider add another Dropdown box (Dropdown2) in your app, set the Items property to following:
Set the Default property of the Dropdown box to following:
Then modify your Filter formula as below:
Filter( Tickets, Status = Dropdown1.Selected.Result,
AccountName = Dropdown2.Selected.Result )
Please take a try with above solution, then check if the issue is solved.
How is the default filter set? Is it always the same? If it is then you simply need to add it to the Search() or Filter() formula being used for the Items property of the gallery. I usually do this by adding it as either a variable or a hidden label on the screen. Then set that value and use that in your Search/Filter string.
What data source is the content coming from? And what is the AccountName field? Shouldn't you be tesing against Path or something similar?
Try '=' or StartsWith() instead of 'in'. You are trying to check a field value where in checks to see if the value is in the column, not the specific record.
Hi @Djanan ,
Based on the formula you provided, I think there is something wrong with it. The Default property of the Gallery control is required to provide a record value, but the Filter formula you provided returns a Table value.
As an alternative solution, please consider take a try with the following workaround:
Set the OnVisible property of the Make screen to following:
ClearCollect( InitialCollection, Filter(Tickets, isFolder = true, "\Business Tracks\Make" in AccountName) )
Set the Items property of the Gallery to following:
If( !IsEmpty(InitialCollection), InitialCollection, Filter(Tickets, Status = Dropdown1.Selected.Result) )
Set the OnSelect property and OnChange property of the Dropdown1 to following:
Please consider take a try with above solution, then navigate to another screen, and then navigate back to the Make screen (fire the OnVisible property of the Make screen), check if the issue is solved.
Hi @Djanan ,
Based on the screenshot that you provided, it seems that there is something issue with the isFolder column. Please check if there is a column called isFolder in your Tickets Excel table.
If there is no column called isFolder in your Tickets Excel table, please remove the isFolder = true condition from your Filter formula.
Note: Within your Filter function, the filtered column you referenced must be existed in your Tickets Excel table. You could not reference columns from another data source within the Filter function.
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round