Change layout of record producer - columns?

lberthold
Kilo Contributor

Is it possible to have fields display in two columns on a record producer - rather than in one. For example, I have created a record producer to create an incident...there are two text fields I'd like to be in a wider column - Description and Short Description. But there are a couple of "meta data" fields I'd like to display in a skinnier column - Contact and Product. I'd like these columns to be side by side - rather than list all fields in one column stacked on top of each other.

 

Any ideas?

Thanks!

Lori

8 REPLIES 8

Hi Lori,



You can use the below script and change the width


g_form.getControl('<VARIABLE_NAME>').style.width = '150px';


For reference fields:


var myVar = $('sys_display.' + g_form.getControl('<REFERENCE_VARIABLE_NAME>').id); //Get the correct reference element


myVar.style.width = '350px'; //Set the width



For more details refer the below article from Mark


» How to set up Field Styles for Service Catalog Variables in Service-now.com



Thanks,


Pradeep Sharma


Hi Pradeep,



Thanks for continuing to look at this.



It seems like this will only changes the field widths, not the column width?



I did try adding the text above with the variable names to the script field in the record producer to each field in one column, but it didn't change anything.



g_form.getControl('short_description').style.width = '800px';


g_form.getControl('description').style.width = '800px';



Not sure what I am doing wrong. But in theory, if you changed the field width for all fields in one column, will it change the column width as well? Or just the field width, but the column width remains the same?



Thanks!


Lori


Hi Pradeep, I tried this method, but it doesn't work for me.   I have a Variable in a Record Producer which is mapped to a field in a table. The name of the Variable is identical to that of the field in the table (u_daily_allowance).   I created a Catalog Client Script onLoad, but that text box is still appearing as half the length of the entire record producer.   Any ideas?



find_real_file.png


knoreikis
Tera Contributor