How to hide the Variable Set on Variable Editor using UI Policy in Scoped Application?

User177031
Kilo Guru

Hi All,

I am trying to hide the variable sets(~25) based on condition through UI policies on Catalog form & Variable Editor in scoped application.

g_form.setDisplay('variable_set', false); - is not working in scoped application.

What are the ways to achieve this requirement?

- Thank you.

1 ACCEPTED SOLUTION

@Sai Venkatesh Suryadevara 

Is this question resolved or you need some more assistance?

Are you giving variable set name in the script?

Regards
Ankur

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

View solution in original post

19 REPLIES 19

Hi Sai,

Did you try to create catalog client script and applies on Target record?

Regards
Ankur

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

Hi @Ankur Bawiskar ,

I had tried Script in UI Policies, UI Policy actions and Client scripts too. But still there is no luck as it is a scoped application.

- Thank you.

Hi Sai,

is this for personal instance? if yes and you are ok you can share the details here

Also what I could get from the scenario is

1) your ui policy is working fine with setDisplayValue() for variable set on catalog form but doesn't work for scoped app

what value you gave inside setDisplayValue()?

Are you using title or internal name?

Regards
Ankur

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

Hi @Ankur Bawiskar ,

This is for Client Instance, which I can't share the credentials.

The whole Record Producer, variables, variable sets and UI policies are built in scoped application.

g_form.setDisplay('submit_a_case', true);// (if the question is selected as submit a case).

UI Policies are working good on catalog form level but not on variable editor.

Refer to the attached screenshots.

- Thank you.

Hi Sai,

Are you saying it is not working on portal form page?

1) working on catalog form during submission

2) working on native view when record opened on target record?

3) not working on portal form page?

Regards
ankur

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