How to: Filter a drop-down list based on the user’s role?

Step-by-step guide


  1. Click on Modules.
  2. Select the Module with the appropriate form field to be filtered by a user’s role.
  3. Select the Forms tab.
  4. Select Field List button "Create/Update Fields".
  5. User the filter to find field that is intended to be made be filtered.
  6. Select Edit on the field.
  7. Select Custom JavaScript tab.
  8. As depicted in the picture below, within the "Filter” section type:


Only  show SWAT-Team members in the assignee drop down:

var filteredItems = fieldScope.items.filter(function (elem) { return elem.roles.find(function (role)

return role.roleName=== 'SWAT-Team' }) !== undefined;});return filteredItems