Default Values for an HTML field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2013 01:49 PM
Hi,
I have a requirement where a a set of fields needs to be added to our change management form in a 3 x 5 table. Because ServiceNow can only perform splits that allows for two columns at a time it was suggested that we create an HTML form and add the "table" within that field using HTML formatting.
I am having some trouble creating this HTML form within the our "high risk activities" field by default. I tried using a before business rule with the following script:
var high_level = '<table> <tr> <td>Header 1</td> <td>Header 2</td> </tr> <tr> <td>Content 1</td> <td>Content 2</td> </tr> </table>;' current.u_high_level =high_level; current.update();
But it returns an error or doesn't populate anything in the field. Would anyone be able to help? How do I create default HTML formatting for a field for every new record?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2013 05:21 AM
I'm going to assume that high risk activities is an html field.
When you create a variable, there is default value field. Put your html code in there.
Save the changes.
Create a new change record and you should see your html in the high risk activities field.