Write a Code for user is itil or not in workflow for if condition ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:43 AM
Hello User
I need a urgent help of How to recognise the user having a ITIL Role or not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:47 AM - edited 01-17-2024 12:47 AM
Hello @1dusjhyahnt ,
in workflow script you can use gs.hasRole("itil") to know if the logged in user has "itil" role.
Kindly mark correct and helpful if applicable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:47 AM
Try with
If (gs.hasRole("itil"))
Please refer below community post.
Thanks,
Kishor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:47 AM
Hi,
Considering you are using GlideRecord User table to check you can simply use below condition
roles=itil as an addEncodedQuery()
If not, please help detail what activity it is being used to add some more context.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:48 AM
@1dusjhyahnt In your script check the following.
if(gs.hasRole('itil')){
//Do something
}
else{
//Do something else
}