how to use single record producer for 2 different user groups

Yakshitha
Tera Contributor

I have requirement to create a single record producer which should display the set of variables based on logged in user group. For users who are part of Group A, then this record producer should display few variables and if users  not part of group A then other variables should display. 
What is the best approach of doing this requirement?

 

@Ankur Bawiskar 

 

9 REPLIES 9

Ankur Bawiskar
Tera Patron

@Yakshitha 

best practice

-> create onLoad catalog client script + GlideAjax and check logged in user group membership

-> based on what script include returns you can show/hide variables

I hope you will be able to achieve this from some blogs etc

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar 
But I have a variable X and based on the values of X the choices of Y variable should display. But the choices of Y is different for group A and non group A members.

@Yakshitha 

then you can write onChange catalog client script and use GlideAjax

based on what script include returns you can add/remove the choices using g_form.addOption() or g_form.removeOptions()

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Yakshitha 

Thank you for marking my response as helpful.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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