Skip to content

Setting up automatic group membership

Dynamic membership adds users to a Group automatically, based on their profile fields, such as job title, department, or location. Instead of adding users by hand, you write a query, and the query keeps the group’s membership up to date.

  1. In the navigation pane, select Manage > Groups.
  2. Open the Group that you want to configure, or create one.
  3. Under Membership, select the Dynamic tab to open the query editor.
  4. In the Query field, enter your query: fields.fieldname, followed by an operator and a value in single quotes. The most common field is fields.title (job title), but you can use any user profile field. See Query syntax and Examples.
  5. Save the query.

The matching users appear on the Dynamic tab of the Group. The Group can take a moment to refresh.

Refer to a field with dot notation: fields.fieldname. Replace fieldname with the field key from the user profile, for example fields.title, fields.department, or fields.location.

OperatorMeaningExample
==The field value matches exactly.fields.title == 'Account Executive'
containsThe field value contains the quoted text.fields.title contains 'Sales'
!=The field value does not equal the quoted text.fields.department != 'Engineering'
OperatorMeaningExample
andBoth conditions must be true.fields.department == 'Sales' and fields.location == 'New York'
orEither condition can be true. Use it to match several values.fields.title == 'Account Executive' or fields.title == 'Sales Rep'

Add all users whose title is exactly “Account Executive”:

fields.title == 'Account Executive'

Add users with any of several titles by chaining conditions with or:

fields.title == 'Account Executive' or fields.title == 'Sales Rep' or fields.title == 'Regional Sales Manager'

Add users who are in the Sales department and located in Chicago:

fields.department == 'Sales' and fields.location == 'Chicago'

Add all users except those in the Engineering department:

fields.department != 'Engineering'
No users are added, although the query looks valid

Field values in a query must match the values stored in user profiles exactly, including capitalization. A query that uses == is case-sensitive.

  1. Open a user profile that should match your query, and note the exact field value.
  2. Change your query to match that value exactly, or change == to contains to allow for differences in capitalization.
  3. Save the query, and give the Group a moment to refresh.

When it is fixed, the matching users appear on the Dynamic tab of the Group.

More users are added than expected

A broad contains value matches every field value that includes that text. For example, contains 'Manager' matches "Account Manager", "Marketing Manager", and every other title with that word.

  1. Find the contains conditions in your query that are too broad.
  2. Change contains to == for each condition that should match an exact title.
  3. Save the query, and check the Users tab to confirm that the membership is correct.

When it is fixed, the matching users appear on the Dynamic tab of the Group.

The query field shows an error, or the query does not save

A syntax error stops the query from saving. The most common causes are missing single quotes, uppercase operators, and stray characters.

  1. Make sure that every text value is in single quotes, for example 'Account Executive'.
  2. Make sure that every operator is lowercase: and, or, contains.
  3. Remove line breaks, extra spaces, and special characters from the query.
  4. Enter the query again, and save it.

When it is fixed, the query saves without an error, and the Dynamic tab shows the matching members.

Screenshot preview

Screenshot