Forum Discussion
JordanMcAlister
6 years agoQrew Captain
Hey! Below is some of my code that I use for you to copy if you'd like. My URL formula button opens up an email in outlook with the "To" and "Subject" already filled in as well as some of the body based on some conditions.
______________________________________________________________________
var text URLONE = "MailTo:emailaddress1"
&
If([District]="Longview",
"; emailaddress2; emailaddress3",""
)
&"?cc= "
&"&subject=" &
If(
[Time Frame]="Priority","Approved Priority Job WR ","Approved Job WR "
)
&[WR #]
&"&body=WR "&[WR #] & " has been approved. Attached is the job packet" &
If([District]="Longview",
" and locate sheet." & "%0d%0a%0d%0a" & "CIR " & [Circuit] & " " & [Substation],"."
)
;
$URLONE
______________________________________________________________________
My URL button with this code gives me this result when I click the button.
So, for your case, I think you would need a text field that puts all the users in the project into the format of "email1; email2; email3; etc." and name it for example - [Project Email List].
Your URL formula code might look like this:
_____________________________________________________________________
var text URLONE = "MailTo:" & [Project Email List]
&"?cc= "
&"&subject=" & [Project Name];
$URLONE
______________________________________________________________________
Then your users can fill out the rest, unless you want some sort of pre constructed body format.
Hope this helps.
______________________________________________________________________
var text URLONE = "MailTo:emailaddress1"
&
If([District]="Longview",
"; emailaddress2; emailaddress3",""
)
&"?cc= "
&"&subject=" &
If(
[Time Frame]="Priority","Approved Priority Job WR ","Approved Job WR "
)
&[WR #]
&"&body=WR "&[WR #] & " has been approved. Attached is the job packet" &
If([District]="Longview",
" and locate sheet." & "%0d%0a%0d%0a" & "CIR " & [Circuit] & " " & [Substation],"."
)
;
$URLONE
______________________________________________________________________
My URL button with this code gives me this result when I click the button.
So, for your case, I think you would need a text field that puts all the users in the project into the format of "email1; email2; email3; etc." and name it for example - [Project Email List].
Your URL formula code might look like this:
_____________________________________________________________________
var text URLONE = "MailTo:" & [Project Email List]
&"?cc= "
&"&subject=" & [Project Name];
$URLONE
______________________________________________________________________
Then your users can fill out the rest, unless you want some sort of pre constructed body format.
Hope this helps.
QuickBaseCoachD
6 years agoQrew Captain
.. a few other tips
to introduce a carriage return use
&"%0A%0A"
The above will do two of them to create a new line with as pace between the previous line.
The other tip is that for any text in thew subject or body, you need to URLEncode because you are creating a URL and URLs do now allow for special characters. So for example
& "&subject=" & URLEncode( ..... the subject)
& "&body=" & URLEncode( ..... the body)
to introduce a carriage return use
&"%0A%0A"
The above will do two of them to create a new line with as pace between the previous line.
The other tip is that for any text in thew subject or body, you need to URLEncode because you are creating a URL and URLs do now allow for special characters. So for example
& "&subject=" & URLEncode( ..... the subject)
& "&body=" & URLEncode( ..... the body)