How to extract a display text from a variable that contains Link?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 07:06 AM - edited ‎03-13-2024 07:15 AM
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 07:31 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 07:52 AM
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