I’m pretty new to Power Apps and have been looking at various sources to help with the syntax of a filter command I am using but have run out of ideas.
Here’s the background:
Filter(Approvals,Country = DataCardValue4.Selected.Value) And Filter(Approvals,'Business Unit' = Dropdown1.Selected.Result)
Any help would be really appreciated. Thanks!
Requisitions:
Approvals
Organization:
Solved! Go to Solution.
I'm old school about database design and do not use compound fields at all, only single line of text, numbers and date/time. The principle that each cell in a database must contain a single piece of data is one that works best for me. Others disagree and there are workarounds but I haven't found the need for them in my apps.
The problem is that country is a choice field. Change it to single line of text and your formula should work.
Thanks @Drrickryp. You mean getting users to type in the country name during data entry and not having the drop down? If so, the impact of doing that (e.g. Power Automate flows that rely on the accuracy of the Country field value) would not be worth the auto-populated value for Legal Director.
You can either hard code the dropdown, use a second list of countries, or use Distinct(Approvals, Country) for the items in the dropdown if you already have all of them in your list.
I used; Distinct(Choices(Approvals.Country),Value) to produce the list in a new dropdown; Dropdown4
The filter has been updated, but still produces the same warning (with no data);
Filter(Approvals,Country = Dropdown4.Selected.Result) And Filter(Approvals,'Business Unit' = Dropdown1.Selected.Result)
Do I need to change the Country and Business Unit fields in the Approvals list from Choice to Single-line text too?
I'm old school about database design and do not use compound fields at all, only single line of text, numbers and date/time. The principle that each cell in a database must contain a single piece of data is one that works best for me. Others disagree and there are workarounds but I haven't found the need for them in my apps.
User | Count |
---|---|
156 | |
93 | |
80 | |
74 | |
57 |
User | Count |
---|---|
201 | |
166 | |
98 | |
94 | |
79 |