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 clear value on Catalog task?

Raghav22
Tera Contributor

Hi,

I have wrote client script for making fields visible false but when i select any random value from dropdown than the previous selected value is showing on catalog task. I want to clear the all field values when i am changing dropdown value and on catalog task only related fields should be shown according to choice of dropdown.

How can i achieve this>

find_real_file.png

 

Please help me out.

Thaks,

Raghav

1 ACCEPTED SOLUTION

Raghu Ram Y
Kilo Sage

HI,

In your client scripts/UI Policies..

you need to make "true" for all the below three, then in all Portal/Catalog task/RITM it will be in a proper sync..

View solution in original post

4 REPLIES 4

Musab Rasheed
Tera Sage

Hi Raghav,

Try using g_form.clearValue() or g_form.setValue("field_name", '');

Please hit like and mark my response as correct if that helps
Regards,
Musab

I want clear all values of fields when i am changing dropdown value and need to set new values according to condition and also i tried using g_form.clearValue but it is not working.

Raghu Ram Y
Kilo Sage

HI,

In your client scripts/UI Policies..

you need to make "true" for all the below three, then in all Portal/Catalog task/RITM it will be in a proper sync..

Thank you Raghu for help.