Print

SetUserFilter

This function set filter for user field.

Syntax

SetUserFilter("FieldTitle", "FilterType", "FilterValues", ["SubDepartments"]);

Function arguments

  • FieldTitle – (String) The user field title
  • FilterType – (String) Could be „department” or „group”.
  • FilterValues – (String) Department or group ids separated by „,” or „;”.
  • SubDepartments – (Boolean) Set sub departments. Used only when filterType as „department”.

Return value

This function returns Boolean.
This function return true.

Examples

Example 1:
This will set users for user field „Employees” only from 2 groups: Administrators and Programmers.

SetUserFilter("Employees", "Group", "Administrators, Programmers");

Example 2:
This will set users for user field „Employees” from 2 departmets: Administrators and Programmers and sub departments.

SetUserFilter("Employees", "Department", "1, 2", true);
Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?