- 入门指南
- 演示应用程序
- 如何
- 通知
- 使用 VB 表达式
- 设计应用程序
- 使用 Autopilot 设计应用程序
- 事件和规则
- 在应用程序中利用 RPA
- 在应用程序中利用实体
- 在应用程序中利用队列
- 在应用程序中利用媒体文件
- 在应用程序中利用操作
- 在应用程序中利用 Connections
- Studio Web 中的应用程序
- 应用程序生命周期管理 (ALM)
- UiPath 第一方应用程序
- 基本故障排除指南

Apps 用户指南
查询生成器允许您筛选 Data Service 实体中的数据,同时遵循预定义的语法。
Fetch 、 FetchOne 、 GetChoiceSet和GetChoiceSetValue函数是异步函数,并且不支持链接。
要在控件中显示实体记录,请使用应用程序变量和“设置值”规则。 您还可以使用查询生成器将控件数据源绑定到实体。
有关实际示例,请参阅使用 Fetch 函数。
Fetch() 函数对 Data Service 实体进行评估和排序。
作为先决条件,您必须将现有 Data Service 实体引用到应用程序中。要使用查询生成器,请继续执行以下步骤:
其他设置
On the Additional settings tab, you can configure rules for the queried data.
The following table describes the elements of the Additional settings tab.
| 元素 | 描述 |
| Page start index (skip) |
Enables you to define how many records to skip before starting to return results. For example, if you enter 10, the query starts from the 11th record. Note: Setting a Page start index can be useful for pagination when using large datasets.
|
| Page limit (top) |
Enables you to set the maximum number of records to return. For example, if you enter 50, the query returns the first 50 rows. Note: Setting a Page limit helps control query size.
|
| Add sort field |
Adds a sort field that allows you to configure a sorting rule for the queried data. The Sort by field and the Sort ascending elements display. |
| 按字段排序 | Enables you to enter the field you to use for sorting the data. |
| 升序排列 | 如果为 True,则按升序对查询的数据进行排序。 |
| Projection | Enables you to define a specific field from the entity that only should be included in the result set.
备注: Projection can can be used to simplify output data.
|
Fetch()函数来检索和操作实体数据。 Fetch()函数是异步函数,并且不支持链接。
Fetch() 函数具有以下参数:
|
参数 |
描述 |
|---|---|
|
| Data Service 中的一组筛选器 |
|
|
指定页面大小和要跳过的记录数。 |
|
|
指定要排序的列和排序顺序。 |
|
|
指定应返回的实体字段。 |
|
|
指定应展开并返回关系实体的列。 Apps 允许一级扩展,这意味着如果您有关系字段,则表达式需要一级属性才可访问。 查询生成器会自动添加这些属性,并且它们对于非系统实体是必需项。 |
The FetchOne() function
Fetch() 返回 ListSource<T> 时,其类型与列表控件相同,而 FetchOne() 返回类型为 T 的单个记录。
Fetch()函数一样, FetchOne()函数是异步函数,并且不支持链接。
Fetch() 函数,以获得更多自定义结果:
简单提取
获取实体的记录数,例如 SystemUsers。
Fetch(of SystemUsers)()Fetch(of SystemUsers)()使用筛选条件获取
Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10))Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10))使用筛选条件和排序顺序(升序)获取
Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10), new SortOption(){addSortOption("Date")})Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10), new SortOption(){addSortOption("Date")})使用筛选条件和排序顺序(降序)获取
Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10), new SortOption(){addSortOption("Date", true)})Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10), new SortOption(){addSortOption("Date", true)})使用静态分页属性获取
Fetch(of SystemUsers)(Nothing, new PaginationProps(0, 100))Fetch(of SystemUsers)(Nothing, new PaginationProps(0, 100))使用控件绑定的静态分页属性获取
例如,对于“编辑网格”控件:
Fetch(of SystemUsers)(Nothing, new PaginationProps(MainPage.EditableGrid.PageStart, MainPage.EditableGrid.PageLimit))Fetch(of SystemUsers)(Nothing, new PaginationProps(MainPage.EditableGrid.PageStart, MainPage.EditableGrid.PageLimit))使用投影获取
Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10), Nothing, new string(){"Name"})Fetch(of SystemUsers)(createFilterGroup(new QueryFilter(){addFilter("Name", "=", "You")}), new PaginationProps(0, 10), Nothing, new string(){"Name"})