How to get instance url dynamically in UI Builder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 09:56 PM
Hi all,
Can anyone please help me on how to get instance url dynamically in UI Builder?
Eg: (https://devxxxxx.service-now.com)-->need to display in text link component in UI Builder
In Text Link component-> its asks for the link -->"https://devxxxxx.service-now.com"+i'll append the page id(eg: /sp)
Regards,
Shalani Rajendran

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 05:40 AM
change the link to a script and then use the function
function evaluateProperty({api, helpers}) {
var instanceURL = gs.getProperty('glide.servlet.uri');
return instanceURL ;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 12:20 AM
Thank you for the response. Yeah thats the way we use script for instance url....i asked in ui builder how to use it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2024 03:06 PM
I realize this is an older post, but I came across this same requirement. I found the easiest way to do this is to use a 'Lookup system properties' data resource that you can pull 'glide.servlet.uri', and then you can build out a link using a client script and/or client state parameter.