Free cookie consent management tool by TermsFeed

a!isUserMemberOfGroup() Function

Function

a!isUserMemberOfGroup( username, groups, matchAllGroups )

Identifies whether or not a user is a member of the specified groups. By default, this function returns true if the user is in at least one of the specified groups.

Parameters

Keyword Type Description

username

User

The username of the user for whom you wish to check for group membership.

groups

Group Array

One or more groups to check for membership.

matchAllGroups

Boolean

Determines whether to match any or all of the provided groups. When set to true, the function will check that the user is a member of ALL of the groups. Default: false

Returns

Boolean

Usage considerations

Returns true when the user belongs to the specified group, except when security rules prohibit users from knowing this information.

For example, this function returns false to keep membership awareness secure in the following instance:

  • A high privacy group is passed in AND
  • A user other than the logged in user is passed in AND
  • The function is executed within the context of a basic user who is not an administrator of the high privacy group

A basic user is not allowed to know whether another user is a member of such groups.

a!isUserMemberOfGroup() cannot be used to define a column of process report data or in a process event.

Examples

You can copy and paste these examples into the Expression Rule Designer to see how this works.

1
a!isUserMemberOfGroup("john.doe", 2)

Returns false

1
2
3
4
a!isUserMemberOfGroup(
  username: loggedInUser(), 
  groups: a!groupsByName("Process Model Creators")
)

The above expression returns true if you are in the Process Model Creators group

1
2
3
4
5
a!isUserMemberOfGroup(
  username: loggedInUser(),
  groups: { 5, 6, 7 },
  matchAllGroups: true
)

The above expression returns false if you are not in all of the following groups: Application Users, Designers, and Quick App Creators.

Feature compatibility

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 Compatible
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 Incompatible

Cannot be used to configure a process report.

Process Events Incompatible

Cannot be used to configure a process event node, such as a start event or timer event.

Old versions

There are older versions of this function . You can identify older versions by looking at the name to see if there is a version suffix. If you are using an old version, be sure to refer to the corresponding documentation from the list below.

Old Versions Reason for Update
isusermemberofgroup_21r2

Now accepts multiple groups and can check whether the user is a member of any or all groups. Also moved to the a! domain.

To use the latest version of the function, replace the function with a version suffix with a new function reference.

To learn more about how Appian handles this kind of versioning, see the Function and Component Versions page.

Feedback