User expressions

Updated 4 weeks ago by Neil

User fields point back to a particular user in your system. Data about that user is pulled from the user management table.

Fields

Any user field that you created on your form can be a part of an expression.

You can also take advantage of these system user fields:

System field

Description

_created_by

The user who started the item

_modified_by

The last user who modified the form

This expression also results in a user field:

lastcompletedstep().approvers()

Displaying user information in forms

User fields cannot display on their own. You must use the dot operator and then add the specific field you want to display. Fields must match with the user management table. For example:

_created_by.FirstName

Here is a list of default fields you can call up from the user management table. You can also use any custom field that you’ve added to the user management table. 

Field name

Data type

Sample syntax

Output

Example

FirstName

Text

_created_by.FirstName

Creator’s first name

Pepper

LastName

Text

_created_by.LastName

Creator’s last name

Potts

Name

Text

_created_by.Name

Creator’s full name

Pepper Potts

Email

Text

_created_by.Email

Creator’s email address

[email protected]

Department

Text

_created_by.Department

Creator’s department

Operations

Location

Text

_created_by.Location

Creator’s location

Tokyo

Status

Text

_created_by.status

Creator’s account status

Active

Phone

Text

_created_by.Phone

Creator’s phone number

555-123-4567

UserType

Text

_created_by.UserType

Creator’s user type

Super Admin

Status

Text

_created_by.Status

Creator’s account status

Active

Designation

Text

_created_by.Designation

Creator’s job title

CEO

Added on

Datetime

_created_by._created_at

Date and time the creator was added to the account

2019-05-23 11:49 AM

Last signed in

Datetime

_created_by.LastLoggedInAt

Date and time the creator last logged into Kissflow

2019-10-31 11:52 AM

Manager

User1

_created_by.Manager

Creator's manager

1. If you want to display information about the Manager in a text field, you must use the dot operator to add an additional field. For example:

_created_by.Manager.Name

Assigning steps with user expressions

In the workflow, you can use a formula to assign a step to a user. In this expression, the data type must be a User.

You can use:

  • the fieldID of any user field in your form
  • a system field
  • a user field called up from the user management table (such as Manager)

You can also use the IF function to assign a step, but both results must be user fields.

Using comparison operators with user fields

The equal to (=) and not equal to (<>) operators can work with user fields.

Here's a common use case. You have a step in a workflow called Manager approval and it is assigned to the creator's manager. But what if the manager is the creator?

Create a condition for that step with this expression:

_created_by<>_created_by.Manager


How did we do?