Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
249 views

condition visibility for specific users connected

Hi,

i need to give visibility of some filed in format design of interaction (ess.sd.open)

the list of  the specific users belongs to specific assignement groups which start by "DR".

i tired to put this condtion like this : [assignements] #"DR" but it does not work.

how can i configure this condition visibility ?

regards.

0 Likes
1 Reply
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: condition visibility for specific users connected

Using [assignments] in a Dynamic View Dependency condition tells the system to check the value in the 'assignments' field on the currently loaded record to determine whether or not to do something.  Since you're not looking to compare against the values in the loaded record, but values in the operator's record you can't do it like that.

Instead, you've got to create a variable that gets populated when the user logs in, and use that variable to set the visibility condition.

When a user logs in, the system stores all the groups they belong to in an array variable called $lo.pm.assignments.  This holds an array of all the groups the currently logged in operator belongs to.

So, here's how I'd solve this.

In the login.DEFAULT formatctrl on the Javascript tab, add something like the following:

var isDR
var assignment = new SCFile("assignment");
var getAssignment = assignment.doSelect("name#\"DR\"");
while (getAssignment == RC_SUCCESS && isDR == null){
    if (system.functions.index(assignment.name, vars.$lo_pm_assignments)>0){
        isDR=true;
    }
    else {
        getAssignment = assignment.getNext();
    }
}

if (isDR==true){
    vars.$lo_dr = true;
}
else {
    vars.$lo_dr = false;
}

 

Then, in your DVD condition, use [$lo.dr] as your condition, and that _should_ work.

The only thing I'm unsure of is that you're using the ess forms, and I'm not sure those users really have regular log ins and operator records.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.