FunctionCopy link to clipboard
user( username, property )
Returns information for a user.
ParametersCopy link to clipboard
Keyword | Type | Description |
---|---|---|
|
Text |
The username or user object of the user whose information should be retrieved. |
|
Text |
The information to retrieve for this user. See Usage considerations. |
ReturnsCopy link to clipboard
Text
Usage considerationsCopy link to clipboard
Using the property parameterCopy link to clipboard
The property parameter accepts the following (case-sensitive) values:
- firstName
- middleName
- lastName
- displayName (the user's nickname)
- supervisorName
- titleName
- phoneOffice
- phoneMobile
- phoneHome
- address1
- address2
- address3
- city
- state
- province
- zipCode
- country
- locale
- timeZone
- customField1
- customField2
- customField3
- customField4
- customField5
- customField6
- customField7
- customField8
- customField9
- customField10
- uuid
- created
- status
- userTypeId
- userTypeName
Note: locale
and timeZone
return the user's preference or null if not set.
Querying multiple usersCopy link to clipboard
The user()
function can only return information about a single user. If you need to return information about multiple users, you should use the a!queryRecordType() function to query the User record type.
For example, you could use the user()
function to display a user's first and last name. But, if you want to display the first and last name of all active users, you would use the following expression:
1
2
3
4
5
6
7
8
9
10
a!queryRecordType(
recordType: recordType!User,
fields: recordType!User.fields.firstAndLastName,
filters: a!queryFilter(
field: recordType!User.fields.active,
operator: "=",
value: true
),
pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 500)
).data
Copy
Returns
1
2
3
4
Jane Doe
John Smith
Sam Jones
William Doe
Copy
Learn more about referencing data from the User record type
ExamplesCopy link to clipboard
The following examples use a sample record type called Employee
. These expressions illustrate how to display data in a record list, which is why they uses the fv!
domain prefix.
Record type object references are specific to each environment. If you copy and paste these examples into your interface, they will not evaluate. Use them as a references only.
Return a user's first and last nameCopy link to clipboard
1
user(username: fv!row[recordType!Employee.fields.username], property: "firstName") & " " & user(username: fv!row[recordType!Employee.fields.username], property: "lastName")
Copy
Returns Jane Doe
.
Return the timestamp when a user was createdCopy link to clipboard
1
user(username: fv!row[recordType!Employee.fields.username], property: "created")
Copy
Returns 12/20/22 10:36 PM GMT
.
Return a user's emailCopy link to clipboard
1
user(username: fv!row[recordType!Employee.fields.username], property: "email")
Copy
Returns jane.doe@example.com
.
Feature compatibilityCopy link to clipboard
The table below lists this function's compatibility with various features in Appian.
Feature | Compatibility | Note |
---|---|---|
Portals | Partially compatible | Can be used with Appian Portals if it is connected using an integration and web API. |
Offline Mobile | Partially compatible | Can be used with offline mobile if it is loaded at the top of the form. |
Sync-Time Custom Record Fields | Incompatible | |
Real-Time Custom Record Fields | Incompatible | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Compatible | |
Process Events | Compatible |