Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Record Producer - Dynamic HTML

dbaril
Tera Expert

I have a record producer which I need to display a section of dynamic HTML from a table.  I have tried using a Rich Text Label, but no value is displayed when assigning a value from an onLoad client script.  I have tried both setValue and setLabelOf commands, neither work.  The only field type that displays the message is type HTML, but I don't want an HTML editor on the page, just the rendered HTML.

1 ACCEPTED SOLUTION

dbaril
Tera Expert

My record producer is not in the Service Portal, therefore setLabelOf() does not work.  I did find the following solution that worked with one minor adjustment.

 

Solved: Re: Change label for catalog variable - ServiceNow Community

 

I had to change "span" to "div" in the following statement:

$j("div").filter(function()

View solution in original post

2 REPLIES 2

AJ M
Mega Sage

For a rich text label, you would not set the Value of the label, but the Label. 

g_form.setLabelOf("your_rich_text_label", "<p>Here's your new Label!</p>");

 

dbaril
Tera Expert

My record producer is not in the Service Portal, therefore setLabelOf() does not work.  I did find the following solution that worked with one minor adjustment.

 

Solved: Re: Change label for catalog variable - ServiceNow Community

 

I had to change "span" to "div" in the following statement:

$j("div").filter(function()