How Can i create a Flag Like VIp and give the condition

Ashutosh4
Tera Contributor

Hello everyone,
I got a req to create a Flag similar to VIP users , but the condition is the falg should be tagged to the users who are a part of a particular group example Group a

if a user raises incident or request then the flag should be visible in the caller field and and in the list view just like how VIP flag is visible I went through this link
Display Image for OIP users similar to VIP users - IT Operations Management - Question - ServiceNow ...
but it seems the condition they had wad very mch similar to the Vip , for me I want for users that are part of a group.
Can anyone help me with the steps and Codes?


Thank you

12 REPLIES 12

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

on form you can show the icon based on checking group membership

you can use GlideAjax to check if user belongs to particular group or not

for list you can use field styles

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ashutosh4
Tera Contributor

Hello Ankur I tried using the same script and the same 


Value:javascript: gs.getUser().isMemberOf('CAB Approval')


background-image: url('images/icons/vip.gif');
background-repeat: no-repeat;
background-position: 98% 5px;
padding-right: 30px;

also I tried 

Value: javascript: gs.getUser().isMemberOf('CAB Approval')

background-image: url('img/highrisk.jpgx');
background-repeat: no-repeat;
background-position: 98% 5px;
padding-right: 30px;

find_real_file.png

The User I tried is a part of the group , but still not sure why it is not working ,

I added the image highrisk.jpg in Image,

Could you please help me in this case?

Thank you

Hi,

you just need to check the style part for icon

the logic to check group membership worked for me

find_real_file.png

find_real_file.png

find_real_file.png

I believe I have answered your question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader