In a Record Producer, where is the coding for the submit button - I need to hide it for a specific response?

Tony98
Mega Expert

I need to hide the SUBMIT button when a Record Producer Variable field response is NO.

Where do i start hiding the button?

find_real_file.png

thanks

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

Not sure about hiding it, but in the script field on the record producer, you add something to block the submission if the variable is No. Something like:



if (producer.varable == 'No')


    current.setAbortAction(true);

View solution in original post

6 REPLIES 6

akshaykumar1
ServiceNow Employee
ServiceNow Employee

Hey Anthony,


Change the type to onChange from onSubmit.


This Client script will run everytime the value of that particular field changes.


On changing the type to onchange, it will ask you the field on which you want to apply the client script. Select the question from the choice list.


varuntayal
ServiceNow Employee
ServiceNow Employee

Hi Anthony,



You will have to use the Akshay's script onLoad as well as onChange. So that when the form loads and when the value of variable changes, the button's display is evaluated.



Hope this helps,