Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Need to enable hyperlink in Variable Under Catalog item

vidyajadhav
Tera Contributor

vidyajadhav_0-1782299404730.png

Hi Team,

 

I have enabled this msg by writing below script in Catalog UI policy. But I want to add hyperlink so that user can click that link and can be routed to the Onboarding form. Which module i can use to enable this

 

var msg = "Choose the appropriate Project Business Role. " +
          "If you are not sure, please check with the Project Lead.<br><br>" +
          "Raise a separate request to complete the Business role onboarding " +
          "/sp?id=onboarding_formhere</a>, " +
          "if you cannot find your team's business role on the list.";

 

g_form.showFieldMsg('role_option', msg, 'info', false);
9 REPLIES 9

Rishabh_Garg
Tera Contributor

Hi Vidya,

  • You cannot populate link using g_form.showfieldmsg().
  • The g_form.showFieldMsg() method is primarily used to display messages (such as error, warning, or informational messages) below a field.

Hope this helps!

Thank you
Rishabh Garg

 

Aditya_hublikar
Giga Sage

Hello @vidyajadhav ,

 

To achieve the result shown in the screenshots, create a Rich Text Label variable in your Catalog Item and place it between the desired variables by setting the appropriate Order value. Open the Rich Text Label's Source Code editor and add HTML containing the message and hyperlink, along with inline CSS for the blue background and styling. Save the variable and test the Catalog Item in Service Portal. The label will appear as a highlighted information section with a clickable link that opens in a new tab. Adjust the Order field if you want to change its position on the form and here i applied ui policy to show and hide that rich text label .

 

Screenshot (1246) (1).pngScreenshot (1247) (1).pngScreenshot (1248) (1).pngScreenshot (1249) (1).png

 

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya

 

Hello @vidyajadhav ,

 

I hope you are doing well . Does your query is resolved ?

Aditya_hublikar
Giga Sage

Hello @vidyajadhav ,

 

show field msg by default work as string field so html content we cant add there . So we need to create that rich text label variable .