Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 02:37 AM
Hello All,
i have a script include in which i would like to add 3 groups in the condition but not sure how to do it .need some help.
The script is:
if (!gs.getUser().hasRole('ABS_EXT_FTS'))
{result += '^name!=EXT_FTS' ;}
return result + '^ORDERBYDESCu_order';
},
I want to change the result line where the groups can be multiple like below.;
if (!gs.getUser().hasRole('ABS_EXT_FTS'))
{result += '^name!=EXT_FTS' ; || '^name!=EXT_FTS_NW' ; || '^name!=EXT_FTS_Storage' ; }
return result + '^ORDERBYDESCu_order';
},
How do i achieve it.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 04:15 AM
if (gs.getUser().hasRole('itil')) {
result += '^nameINEXT_FTS,EXT_FTS_NW,EXT_FTS_Storage';
}
else if(gs.getUser().hasRole('ABS_EXT_FTS')){
result += '^name!=EXT_FTS^name!=EXT_FTS_NW^name!=EXT_FTS_Storage';
}
return result + '^ORDERBYDESCu_order';
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 03:26 AM
@Renu4 Update your script as follows.
if (!gs.getUser().hasRole('ABS_EXT_FTS'))
result += 'name!=EXT_FTS^ORname!=EXT_FTS_NW^ORname!=EXT_FTS_Storage';
return result + '^ORDERBYDESCu_order';
},
Hope this helps.