Select Multiple Sub-Group Roles

When you have a form where there are multiple group roles, you can select multiple sub-groups for a role using the .indexOf method in your rule.  

Example:   

Check to see if user has "oit_security_frevvo_exit_" in it:

Rule Code:

var x;

if (form.load) {

    // User Information

    var roles = _data.getParameter ("subject.roles");

    if (roles) {

        eval ('x=' + roles);

        for(var i =0; i<x.length; i++){

          if(x[i].indexOf("oit_security_frevvo_exit_") > -1){

            //This user role starts with oit_security_frevvo_exit_    

            frevvo.log(x[i]);

          }

        }

    }

}

Details

Article ID: 50211
Created
Wed 3/14/18 2:31 PM
Modified
Thu 3/15/18 1:27 PM