Hide subcategory option depending on role and group

Rairai31
Giga Guru

Hi,

I have a requirement to show a subcategory from an incident form depending on the role and group membership. This is working on SOW but not on native view, UI Type is on ALL. Can you please advise what needs to be done? Thank you.

Rairai31_2-1736735462134.png

 

Rairai31_1-1736735378178.png

 

1 ACCEPTED SOLUTION
15 REPLIES 15

Community Alums
Not applicable

HI @Rairai31 ,

By UI Type it means whether it's for Desktop/mobile or ALL. YOur Worlspace UI and Native UI both falls under Desktop, so that just not decides whetehr it will work for both native or workspace or not.

What you need to check is, Set the "Isolate Script" field on the client script to "True".

 

Thank you very much @Community Alums for clarifying that. 

 

Yes, Isolate Script is set to TRUE. 

Rairai31_0-1736738438906.png

Thank you

Ankur Bawiskar
Tera Patron
Tera Patron

@Rairai31 

it should work fine, script is ok

Did you add alert and see what came in alert for that scratchpad variable?

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

Hi @Ankur Bawiskar,

 

Thank you for the response. Yes, I have added alert too. Here is the snip on SOW. 

Rairai31_0-1736738969444.pngRairai31_1-1736738996365.png

Here is on the Native view:

Rairai31_2-1736739081456.png

**Alert was showing on the native view as well.

The Swap is not showing on the SOW but it is showing on the native view.

 

Thank you