is it possible to make a section of the catalog request form only available to certain groups?

JLeong
Mega Sage

Good day!

 

Is it possible to make a section of the catalog request form only available to certain group of users?

 

Example, a set of questions are only applicable and visible to users in Poland.

 

Thank you!

 

Regards,

Jocelyn

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@JLeong 

Yes why not.

You can use onLoad catalog client script and check logged in user's location.

if not Poland then use g_form.setDisplay('variable1', false); to hide

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

Bhimashankar H
Mega Sage

Hi @JLeong ,

 

You can do it using the UI policy. Keep onLoad checked and reverseIfFalse.

Add your specific condition then write the below script in execute if true

function onCondition() {

   g_form.setVisible('section_name', true); //setVisible true/false based on your condition

}

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!

View solution in original post

6 REPLIES 6

@Shruti D

Could you kindly confirm that the script you shared is fully functional?

When I ran it, it returned undefined.

To prevent any confusion, please share only verified, working code along with accurate references to documentation.

AnkurBawiskar_0-1755090014154.png

 

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

Bhimashankar H
Mega Sage

Hi @JLeong ,

 

You can do it using the UI policy. Keep onLoad checked and reverseIfFalse.

Add your specific condition then write the below script in execute if true

function onCondition() {

   g_form.setVisible('section_name', true); //setVisible true/false based on your condition

}

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!