Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to make ui formatter variables editable and mandatory

vikaskv
Tera Contributor

I have created record producer variables and populated those variables in target table using ui formatter i have make the fields in variables mandatory and editable in target table.
pleease refer to my screenshot and guide me through

7 REPLIES 7

anshul_goyal
Kilo Sage

Hello @vikaskv,

Kindly refer to the community post below, as it may be helpful for your requirement:

https://www.servicenow.com/community/itsm-forum/make-variable-editable-in-variable-formatter/m-p/261...

Please mark my solution as helpful and accepted for future reference.

Thanks

Hey anshul _goyal as per requirement i need to create ui action button based on click of button the fields should be mandatory and editable 

Then you can create a client callable UI Action and under the script use the below code based on your requirement:

g_form.setReadonly('variables.variableName', false);
g_form.setMandatory('variables.variableName', true);


Please mark my solution as helpful and accepted for future reference.

Thanks

Shraddha Kadam
Giga Sage

Hello @vikaskv ,

 

Create catalog UI Policy and add you required condition to make variables mandatory or editable. Just to make sure, select "Applies on target table". 
Please find screenshot for your reference -

ShraddhaKadam_0-1752207658457.png

 

 

If my response was helpful, please mark it as correct and helpful.
Thank you.