Inside Activate
Activate Expressions
Common Examples
7 min
activate expressions are used to retrieve data, perform comparisons, and manipulate dates and strings within activate products this article provides common examples and explanations to help you understand how expressions are structured and where they can be applied retrieve user attributes use expressions to access properties related to the current user \=/user/roles/departments/0/name returns the name of the user’s department compare job data values expressions can evaluate conditions using job argument data \=eval(=//job/data/owner1 != =//job/data/owner2) checks whether the two job owners defined in the job data are different date calculations activate expressions support date arithmetic and formatting \=dateadd(=//system/now, "=/securitygroup/creategrouptype/expirationtime") adds a specified expiration time to the current system date \=dateadd(h, 24, =if(=/user/expirytime < =todate("1/01/1970 12 00 00 am"), =//system/now, =/user/expirytime)) if the user expiry time is null, the current system date is used instead, and 24 hours are added role membership checks you can verify whether a user is a member of a specific role \=!isinrole("administrators") checks that the current user is not a member of the administrators role \=isinrole(=//roles/system roles/service desk, =//job/submituser) checks whether the job submit user is a member of the service desk system role date formatting use the format function to display dates in a specific format \=format("{0\ dd/mm/yyyy}", =todate(=//job/data/connector/startdate)) formats the connector start date as day, month, and year \=format("{0\ dd/mm/yyyy}", =//job/maxexpirydate) formats the maximum expiry date using the same date format