- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2014 03:35 AM
Hi, Im trying to get my form link UI Action to open a URL, where the end of the URL name changes dependant on whats in a field on the form.
I can get it open, but, unfortunately Im struggling with the passing the number to the end of it.
The field on the form is called u_project_no. Its a string.
Heres what I have so far:
function showGoogleSite() {
var url = new GlideURL('https://sites.google.com/a/rentokil-initialsites.com/' +'current.u_project_no');
var w = getTopWindow();
var newWindow = w.open(url.getURL(), "_blank");
newWindow.focus();
return false;
}
Im not hot on Javascript, but Im trying! Can anyone help please?
Thank you in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2014 06:43 AM
Hi Pennie,
Please try the below script and let me know the outcome.
function showGoogleSite() {
var Projno = g_form.getValue('u_project_no');//Gets the current project no
alert(Projno) //Just for testing purpose to see if the value is passed
var url = new GlideURL('https://sites.google.com/a/rentokil-initialsites.com/'+Projno);
var w = getTopWindow();
var newWindow = w.open(url.getURL(), "_blank");
newWindow.focus();
return false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2014 06:43 AM
Hi Pennie,
Please try the below script and let me know the outcome.
function showGoogleSite() {
var Projno = g_form.getValue('u_project_no');//Gets the current project no
alert(Projno) //Just for testing purpose to see if the value is passed
var url = new GlideURL('https://sites.google.com/a/rentokil-initialsites.com/'+Projno);
var w = getTopWindow();
var newWindow = w.open(url.getURL(), "_blank");
newWindow.focus();
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2014 06:46 AM
Thats brillant thank you! That worked!
Thanks so much for your help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2016 09:01 AM
Hi Pennie,
Thanks for the update.
Would you mind marking my response as correct and close the loop if that answers your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2016 02:26 AM
I don't seem to be able to mark it as correct, theres no button there, I tried to change my original post but I can't see the tick box to say mark it as a question