Remove White Space Between Form Variables

SNowflake3
Kilo Contributor

ServiceNow Version: London

I need to remove the white space visible between the items on a new form I am creating. I simply created the variables and they seem to have spaced themselves out without reason. See below screenshot.

find_real_file.png

Thanks in advance for your help.

12 REPLIES 12

Thanks for starting a new comment thread. Ha.

This actually did much better, though there is still a floating div container that I cannot figure out why it is being generated. This is definitely a viable solution for now. Thank you for all your help, djohnson! Let me know if you have other ideas to try.

find_real_file.png

Charles Ladesic
Tera Expert

In your client script or UI Policy use g_from.setDisplay('variable', bool); This will adjust the whitespace between the next variable order. If using g_form.setVisible('variable',bool);  This doesn't adjust the whitespace.

This response needs an upvote.
I've used g_form.setVisible many times without issues.

 

Suddenly I had a huge blank space on the variables list of the Requested Items for a specific Catalog Item.
I had no idea how to remove the blank space, but after seeing this I changed the setVisible to setDisplay and it worked wonders.

 

g_form.setDisplay('variable_name', true/false);