- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:23 AM
I created one assignment group field in catalogue form level, that feild is to be visible ITAS users
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:58 AM
Hi @deepika adimu,
Try this onload client script to hide assignment group variable
Create a display Business rule with script as. Place the below script between function templates in script body.
g_scratchpad.grp = gs.getUser().isMemberOf('PASS GROUP NAME HERE'); // ITAS users
Now create the client script as
function onLoad() {
if (g_scratchpad.grp){
g_form.setDisplay('u_assignment_group', true);
}else{
g_form.setDisplay('u_assignment_group', false);
}
}
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
Regards,
T Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:58 AM
Hi @deepika adimu,
Try this onload client script to hide assignment group variable
Create a display Business rule with script as. Place the below script between function templates in script body.
g_scratchpad.grp = gs.getUser().isMemberOf('PASS GROUP NAME HERE'); // ITAS users
Now create the client script as
function onLoad() {
if (g_scratchpad.grp){
g_form.setDisplay('u_assignment_group', true);
}else{
g_form.setDisplay('u_assignment_group', false);
}
}
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
Regards,
T Mohan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:00 AM
Hi @deepika adimu ,
Best to use read ACL to hide/Show that field based on role.
or
Hiding a field is controlled by Client side so you can use either UI Policy script or Client script.
Use OnLoad Client side code :
function onLoad() {
if(g_user.hasRole("Mention the Manager role")) // Provide the role
{
g_form.setDisplay("Field name",true);
}
else
{
g_form.setDisplay("Field name",false); //
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:06 AM
Hi @deepika adimu ,
You can write a onLoad catalog client script and check for role condition to hide field.
function onLoad() {
//Type appropriate comment here, and begin script below
var user = g_user.hasRole('Role of ITAS user');
if (user) {
g_form.setDisplay('assignmnet group field name', true);
} else {
g_form.setDisplay('assignmnet group field name', false);
}
}
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Mayur Shardul