want to hide the options of the multiple choice in the service catalog based on the logged in user

Community Alums
Not applicable

Hi All,

 

Having a requirement in one catalog form Request type is there in that under that there are 4 options are there 

based on the logged in user the options has to visible on the form.

If the user is the owner of the particular table then some options has to visible on the form.

if the user is not member of the table then some other options has to visible.

 

is there any way to achive this requirement. need suggestions.

 

 

Regards,

Vinod.

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

yes it's possible

Please use onLoad Catalog client script + GlideAjax

Script include function will check if logged in user is part of that group or not

then you can return true/false

Then in your client script use g_form.removeOption('variableName', 'choiceValue') to remove the choices

this link has solution; just enhance

Hide Question Choice based on logged in user belonging to group

Regards
Ankur

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

View solution in original post

@Community Alums 

Hope you are doing good.

Did my reply answer your question?

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

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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

yes it's possible

Please use onLoad Catalog client script + GlideAjax

Script include function will check if logged in user is part of that group or not

then you can return true/false

Then in your client script use g_form.removeOption('variableName', 'choiceValue') to remove the choices

this link has solution; just enhance

Hide Question Choice based on logged in user belonging to group

Regards
Ankur

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

@Community Alums 

Hope you are doing good.

Did my reply answer your question?

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

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