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.
IvanWeiss
6 years agoQrew Captain
Okay so this helps A LOT and I appreciate the time to post this!
Now what I am not sure of is how I can create that email list.....
Is it an automation where I need to append to data in a field and add the email address with a semi colon?
Or is it a formula and do I have it set to add the text strings together?
But how do I access the email address from the user table for my variable?
So I have (3) users in my app as a test
Aaron Weiss
John Brooks
Ivan Weiss
Lets say I am the "project designer" which is a field in my table and John Brooks is my "project estimator" which is a seperate field in my table.
I have (3) other roles that are fields in my table but they are blank....
How do I generate the email list for the two of us?
Now what I am not sure of is how I can create that email list.....
Is it an automation where I need to append to data in a field and add the email address with a semi colon?
Or is it a formula and do I have it set to add the text strings together?
But how do I access the email address from the user table for my variable?
So I have (3) users in my app as a test
Aaron Weiss
John Brooks
Ivan Weiss
Lets say I am the "project designer" which is a field in my table and John Brooks is my "project estimator" which is a seperate field in my table.
I have (3) other roles that are fields in my table but they are blank....
How do I generate the email list for the two of us?