Service Catalog Space Between Variables, Record Producer Variable Space

igaray
ServiceNow Employee
ServiceNow Employee

Variables in the Service Catalog can leave large amounts of white space between other variables when using containers, or in other words the padding / margining of the height are larger than usual.   This happens at times for many reasons :

This is related to PRB665752

1. The UI Policy is actually hiding the row rather than displaying none.

Here is an example:

space visual.png

Here is what it looks like in code:

incode.png

You Can Work around this By:

1.   Create a Catalog Client Script and have it run onLoad

2.   Use the code below.

This code has been use to work around a few different customers however, you can modify it to fit your own need.  

var hello= document.getElementsByTagName('td');

var parent=null;

for(var i=0; i < hello.length; i++){

      parent= hello[i].parentElement;

      if(parent.id.indexOf('container') != -1){

              hello[i].style.paddingBottom='0px';

      }

}

Example of different solution:

var myClass = document.getElementsByClassName('iotd');

var i; for(i=0; i < myName.length; i++){

      if(myClass[i].parentElement.id.indexOf('element.container') != -1){        

              myClass[i].style.paddingBottom="5px";

      }

}

After using this code remember to   cache.do to ensure   the code loads on your system correctly.

1 ACCEPTED SOLUTION

igaray
ServiceNow Employee
ServiceNow Employee

You are correct Steven it is meant to be in a container, but it can also just be a stand alone UI Policy that is not setting display none correctly.


View solution in original post

5 REPLIES 5

Steven Young
Tera Guru

There is more space when a container is added.  


Is that a Container??


igaray
ServiceNow Employee
ServiceNow Employee

You are correct Steven it is meant to be in a container, but it can also just be a stand alone UI Policy that is not setting display none correctly.


Hi Garay,



Was this issue fixed in any path(patch 7 or 8)?



Thanks and regards,


Swamy


igaray
ServiceNow Employee
ServiceNow Employee

Hi Amaradi,



Geneva Patch 8 fixed



Thanks.