Change layout of record producer - columns?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2014 07:23 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2014 10:34 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2014 11:19 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2016 03:48 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 09:15 AM
Lori,
Here is an article that may help: ServiceNow KB: Determining if you are using the correct container variable (KB0539982)