How to extract a display text from a variable that contains Link?

ArpitaVK
Tera Expert

I have a variable which stores a Link to the record (e.g. Vulnerable item). I want to include the Number of that record in the subject of that email. How to get the number from that Link variable? e.g. if VIT00090 is saved a link in the variable and in the subject I want to print only the VIT00090 as a simple number; and not the link.

Following is the code for link variable:

 

getVulLink: function(vulGr) {
        var linkVulRecord = '<a href="' + vulGr.getLink() + '">' + vulGr.number + '</a>';
        return linkVulRecord;
},
 
The value returned from this function is stored in the other variable.
2 REPLIES 2

Sumanth16
Kilo Patron

Hi @ArpitaVK ,

 

I used the following approach to check if the URL contains a certain look up string:

 

gs.action.getGlideURI().toString().indexOf('Search String')



I used the following to get the value of URL Parameters:

 

gs.action.getGlideURI().getMap().get('URL Parameter Name')

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

swathisarang98
Giga Sage
Giga Sage

Hi @ArpitaVK ,

 

could you please share any screenshot of the variable which is capturing url link ?

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang