How to create dynamic hyper link on service catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 07:42 AM
I am building the catalog forms where based on requester dept link will get populated and this should be the clickable.
I have written a script to populate the URL but that URL is clickable it s just a text URL. Any idea how to make is a hyperlink.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 07:43 AM
Can you share what you're doing specifically. e.g. I have a text field, or I'm writing to the dom or I'm using a ui macro etc etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 07:44 AM
Could you please post your script here so that we can take a look?
Regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 11:32 AM
I wrote one catalog client script
OnChange Script :
var req = g_form.getReference('requested_for');
if((req.u_company) == "abc"){
g_form.setValue('label', 'http://google.com');
else
g_form.setValue('label', 'http://yahoo.com');
}
I have created one label field. I don't know which type of field should I select. I tried with many field types, still, the link is not clickable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2018 11:36 AM
So writing a url to a label won't make it a link. You'd need to write html to do that.
Here's what I'd recomend.
Create a UI Macro and add that to your item, have that render the link given based on the other variables.
If you need the same on the service portal, you'll also have to make a widget to do the same.