Change variable order with script

chadlockwood
Kilo Sage

I'm using a client script to hide/show variables on a record producer based on the selected value of a dropdown box. For one selected value, the layout of the form is off due to the fields that are hidden (read: too much white space between fields). Is it possible to change the order of variables on a record producer using a script so that the layout remains pleasing?

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi ChadlockWood,



I am assuming you are using g_form.setVisible(fieldname,boolean) in the client script. If yes, then please switch to g_form.setDisplay(fieldname,boolean)


GlideForm (g form) - ServiceNow Wiki



Please let me know if you have any questions.


View solution in original post

3 REPLIES 3

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi ChadlockWood,



I am assuming you are using g_form.setVisible(fieldname,boolean) in the client script. If yes, then please switch to g_form.setDisplay(fieldname,boolean)


GlideForm (g form) - ServiceNow Wiki



Please let me know if you have any questions.


Pradeep


That was exactly the solution and in record time! This community is amazing.



Thanks for your help,


Chad


Perfect


I am glad I can be helpful