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

@Rairai31 

removeOption() should work in workspace also

Did you find any documentation for this?

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

@Ankur Bawiskar 

Yes. It is working fine for SOW but not on the native view. We are expecting the Swap to be not visible on native view too. The correct display is on SOW. 

@Rairai31 

are you giving the correct choice value?

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

@Rairai31 

remember scratchpad variable is initiated only once when form is loaded

whenever you change the field the same scratchpad variable will be used

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

@Rairai31

so it's working in SOW but not in native?

Ideally it should remove then if it's showing alert

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