Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Rich Text label with hyper link in MRVS

sweethripur
Tera Contributor

I’m trying to add a Rich Text Label variable containing a hyperlink to a Multi-Row Variable Set (MRVS), but I receive an error stating that Rich Text Label variables aren’t supported in an MRVS. What alternative options could I use to display the hyperlink?

4 REPLIES 4

Rafael Batistot
Kilo Patron

Hi @sweethripur 

 

A simple alternative is to use a URL variable inside the MRVS and store the link there. However, if you need custom clickable text rather than displaying the URL, MRVS has limitations because Rich Text Label and HTML variables aren’t supported.

 

https://www.servicenow.com/community/developer-forum/how-do-i-embed-a-link-in-a-multi-row-variable-s...

If this response was helpful, please mark it as Helpful and, if applicable, as Correct.
This helps other users find accurate and useful information more easily

RaghavendraGund
Tera Contributor

Hello @sweethripur 
I replicated this in my PDI and got the same error: 'Rich Text Label' variable cannot be part of multi-row variable set along with Invalid insert.

The block comes from an out-of-the-box before business rule on the Variable [item_option_new] table called Restrict types for table variable set. It runs on insert and update when the variable belongs to a Multi Row variable set and its type is on a restricted list. Rich Text Label is on that list, so this is expected platform behavior. I wouldn't deactivate that rule

Alternative Option:
URL  Variable inside the MRVS
URL isn't restricted, so it saves fine. I set the link as the default value and made the variable read-only.
Here's how it behaved in service portal

  • Add/Edit Row modal: the URL shows as a clickable link.
  • Grid (after the row is added): the URL shows as plain text. Users can click the edit (pencil) icon to open the row and reach the link again

One thing to note: in the classic catalog view (non-portal), the URL shows as plain read-only text in both the modal and the grid, so this works best if your users order through the portal.
I feel this is the closest solution. please refer attached screenshots.

Also, please click Solution Accepted and click Helpful, if my reply added any value to you.

Regards
Raghavendra G



 

Ankur Bawiskar
Tera Patron

@sweethripur 

yes it's not supported

but there is a hack

1) disable this BR in default update set "Restrict types for table variable set"

2) add your Rich Text Label variable within MRVS while being in your update set

3) activate that BR again in default update set

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @sweethripur  ,

 

Approach suggested by @Ankur Bawiskar  look like this 

 

Aditya_hublikar_1-1789624007645.png

 

Aditya_hublikar_0-1789623955184.png

 

Or You can simply use URL datatype .