Reputation: 662
How can I filter rows for my Dropdown control?
Currently I'm binding Items property to column e.g. Items=Table1.Name
but this populates dropdown with all possible rows. I want to filter all rows in which another column meets condition e.g. Table1.Date=Today()
Upvotes: 1
Views: 7443
Reputation: 1
Just a note that I had to do something a little more complex for filtering out results for a SQL source where I also needed a Distinct.
The basic idea is I wanted years out of a table, but only last year and whatever years we had listed. Also worth noting the 500 row limit was a bit of an issue against my original date table, and so this only works with smaller tables.
In my case, I needed to create a view to reduce the data granularity
Distinct(Filter('[dbo].[YearList]', YearNumber >= Year(Now()) -1), YearNumber)
Upvotes: 0
Reputation: 87228
You can use a Filter
expression in the Items
property of your dropdown control:
Items: Filter(Table1, Date = Today())
And you can select which field of your table to show in the dropdown by using the Advanced view (in the case below, Name
, as you had in your example):
Upvotes: 2