Service Catalog Item rich text label populated with values obtained through Client Script

litchick10
Tera Guru

We have a catch all catalog item and we are trying to get users to use the correct catalog item instead of using the catch all. We currently have rich text label field that displays a list of catalog items that could be used based on category selected. We want to automatically populate the info for each category with a client script.  I don't need help with the script but I cannot seem to figure out how to change the html contents of the rich text label. Do I need to use another field type or is their a way to set the value of the html from the client script. 

 find_real_file.png

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Hi,

You can use:

g_form.setLabelOf('<field>','<value>');

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Can we make this as a link?

Allen Andreas
Administrator
Administrator

Hi,

Unfortunately, it doesn't appear that you can script to change the rich text label field.

Using g_form.setLabelOf('field_name', 'field_value'); works with other labels, but not the rich text label.

You'd possibly want to review using an alternative solution where you create individual widgets (or UI Pages for standard UI) for what you want to show, and then use variable macros and set the widgets/UI Pages on those macros to determine which shows, etc.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I thought that might be the answer.  My problem is I don't know how to set this up where the client script would change the UI page content.  Would it just be a standard client script with updated content passed to the specific UI page?