---
title: Expressions Examples
slug: expressions-examples
createdAt: 2025-07-14T03:28:10.327Z
---

This document provides a collection of Activate Expression Language examples commonly used across web forms, notifications, and workflows. These examples serve as a quick reference for frequently asked questions and typical expression patterns.

## Display a group member list in a notification as HTML links, separated by line breaks.

\=foreach(=/securityGroup/Members, '%=weblink()%')%

## In a web form, check if a job argument list contains more than one item.&#x20;

Returns true or false.
\=if(=//Job/data/owners/item/Count \< 2, false, true)

## Retrieve the current user's department name.

\=/user/roles/Departments/0/Name

Evaluate whether two owners in job arguments are different.
-----------------------------------------------------------

\=eval(=//Job/data/owner1 != =//Job/data/owner2)

## Add a date interval to the current system time using the group's expiration time.

\=dateadd(=//System/Now, "=/securityGroup/CreateGroupType/ExpirationTime")

## Checks if the current user is NOT in the "Administrators" role.

\=!IsInRole("Administrators")

## Checks if the Submit User for a job is in the "Service Desk" system role.

\=IsInRole(=//Roles/System Roles/Service Desk, =//Job/SubmitUser)

## Format a date as dd/MM/yyyy from a job's connector start date.

\=format("\{0\:dd/MM/yyyy}", =toDate(=//Job/data/connector/StartDate))

## Format the job's max expiry date as dd/MM/yyyy.

\=format("\{0\:dd/MM/yyyy}", =//Job/maxExpiryDate)

## Adds 24 hours to the user's expiry time. If expiry time is null or unset, uses the current system time instead.

\=dateadd(h, 24, =if(=/user/ExpiryTime \< =toDate("1/01/1970 12:00:00 AM"), =//System/Now, =/user/ExpiryTime))

## Filter specific users from a DirectReports collection

\=filter('=//CurrentUser/DirectReports', '@=>\{=/Name} != "Alison Head"')

## Notes

- **Paths like&#x20;**`=/user/roles/Departments`**&#x20;or&#x20;**`=//Job/data` refer to elements within the Activate data model context.
- Functions like `IsInRole`, `dateadd`, `format`, and `eval` are built-in **Activate Expression Language utilities**.
- Use `<br>` or other HTML tags within `foreach` for formatting **HTML-based notifications**.








