1

如何过滤下拉控件的行?

目前我正在将 Items 属性绑定到列,例如Items=Table1.Name ,但这会使用所有可能的行填充下拉列表。我想过滤另一列满足条件的所有行,例如Table1.Date=Today()

4

2 回答 2

2

您可以在下拉控件的属性中使用Filter表达式:Items

Items: Filter(Table1, Date = Today())

您可以使用“高级”视图选择要在下拉列表中显示的表格字段(在下面的示例中Name,如您在示例中所做的那样):

在此处输入图像描述

于 2016-12-06T19:11:52.587 回答
0

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)
于 2018-11-07T21:54:17.160 回答