Single row variable set

abhisek
Tera Contributor

In a catalog item there is a single row variable set which has couple of variables. Inside the variable set there is an ui policy which is setting 2 variables form the variable set mandatory and visible based on the condition zone is A and have an account is yes. Outside the variable set I have written an on-change catalog client script which is setting those 2 variables read only based on the condition zone is A, have an account is yes and what you want is service but this client script is not working.

Can anyone please help me out. It is urgent.

Thanks in advance.

 

Regards,

Abhisek Chattaraj.

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@abhisek  

clearly there is a conflict between the UI policy and client script

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 ,

Thanks for your reply. Does that mean we can't set those 2 fields read only using client script due to the ui policy inside variable set?

Regards,

Abhisek Chattaraj

 

@abhisek  

if the variable is mandatory then you cannot make it read-only

To make it readonly you need to make it non-mandatory first

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

Mark Manders
Mega Patron

Share your script. We can't tell you why a script doesn't work if we don't know the script.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark