This function references a set of records from a record type and allows additional filtering if necessary.
a!recordData (recordType, filters)
Keyword | Type | Description |
---|---|---|
|
RecordType |
A reference to a record type, configured using the |
|
Any Type |
A single logical expression or a list of query filters, which are applied together with an |
The a!recordData()
function returns the RecordData data type.
a!recordData()
function is only supported in the data parameter of the read-only grid and charts.a!queryFilter()
function or the a!queryLogicalExpression()
function to define query filters in a!recordData()
.a!recordData()
function's filter parameter, you must reference fields from the source record type. Use a record type field reference to reference the field you want to filter by. For example, recordType!Employee.fields.department
.NOTE: This expression uses the record type Employee for the purpose of illustration only. If you copy and paste the expression below into an expression, it will not evaluate in your Test Rules interface. Use it as a reference only.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
a!gridField(
label: "Employees",
/* Using the recordData function so we can filter out certain records. */
data: a!recordData(
recordType: recordType!Employee,
filters: a!queryFilter(
field: recordType!Employee.fields.title,
/* This filter removes all records where "Manager" is found in the "Title" column. */
operator: "<>",
value: "Manager"
)
),
columns: {
a!gridColumn(
label: "ID",
sortField: recordType!Employee.fields.id,
value: fv!row[recordType!Employee.fields.id],
align: "END",
width: "ICON"
),
a!gridColumn(
label: "First Name",
sortField: recordType!Employee.fields.firstName,
value: fv!row[recordType!Employee.fields.firstName]
),
a!gridColumn(
label: "lastName",
sortField: recordType!Employee.fields.lastName,
value: fv!row[recordType!Employee.fields.lastName]
),
a!gridColumn(
label: "Department",
sortField: recordType!Employee.fields.department,
value: fv!row['recordType!Employee.fields.department]
),
a!gridColumn(
label: "Title",
sortField: recordType!Employee.fields.title,
value: fv!row[recordType!Employee.fields.title]
)
}
)
a!queryFilter()
function to define filters in the a!recordData()
or a!queryRecordType()
functions before any grouping or aggregation is computed.