当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > query
The <query> element defines which fields the user can query at runtime.
<query>元素定义了允许用户搜索的字段。
Note: The fields in the <query> element must be presented in the SQL for the report/list.
注意:<query>元素中的字段必须被放置在SQL中。
The <query> element may have the following child elements:
<query>元素可以包含下面这些子元素:
Element 元素 | Description 描述 |
---|---|
field | Defines the data field that can be queried. 定义可以被查询的数据字段 The default type for the data field is text. If the data field is numeric or is a date field, use the following: <field type="number"> - for a numeric data field [数值型] |
label | Defines a label for the query field 为查询字段定义一个标签 |
operator | Defines a query operator 定义一个查询操作符 |
sql | Defines a drop-down box with values to query 定义一个包含查询值参数的下拉框 |
value | Defines a predefined query value 定义一个预定义查询值 |
A simple query:
一个简单的查询语句:
<?xml version="1.0" ?> <appml> <title>CUSTOMERS</title> <database> <filters> <htmlreport /> </appml> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果
A query with a predefined value:
包含预定值的查询语句:
<?xml version="1.0" ?> <appml> <title>CUSTOMERS</title> <database> <filters> <htmlreport /> </appml> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果
A query with a drop-down box on country:
包含下拉框(国家字段)的查询语句:
<?xml version="1.0" ?> <appml> <title>CUSTOMERS</title> <database> <filters> <htmlreport /> </appml> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果