JordanMcAlister
7 years agoQrew Captain
URL - Formula Field not executing all actions
Hi,
I am having issues with my URL Formula field not executing all my actions. If I comment out either one, it works, but it seems as though when it executes one action, the rest get ignored. Also, I am not great with coding, so I may have a really simple theory or format mistake. Basically, I have a button and I need it to send an email with a download link from the "Sketch" or "Updated Sketch" field to a specific user for approval while also updating the "Sent for Approval" field with the current date.
Currently, I can do one or the other depending on which command I comment out, but not both; if none are commented out, it just executes the first command. So, is there a way to execute this all at once? Or perhaps a better way?
Other Parameters:
-My key field is [WR #]
-[WR #] -> fid = 10
-[Sketch] -> fid = 71
-[Updated Sketch] -> fid = 91
Here is my code:
-------------------------------------------------------------------------------------
var text URLONE = "MailTo:someone@someplace.com"
//&"?cc=user2@domain.com; user3@domain.com; user4@domain.com"
&"&subject=WR for Approval"
&"&body=WR "&[WR #] &" is ready for approval."&"%0A%0A" &"Below is the download link for the sketch:" & "%0A" &
If(
[Updated Sketch]="",
"https://pike.quickbase.com/up/"; & Dbid() & "/a/r" & [Record ID#] & "/e71/v0",
"https://pike.quickbase.com/up/"; & Dbid() & "/a/r" & [Record ID#] & "/e91/v0"
);
var text URLTWO = "https://pike.quickbase.com/db/bmwn5ta2x";
& "?a=API_EditRecord&key=" & [WR #]
& "&_fid_50=" & ToText(Today()) & "&apptoken=myapptoken";
var text URLTHREE = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$URLONE
&
$URLTWO
&
"&rdr=" & URLEncode($URLTHREE)
-------------------------------------------------------------------------------------
All help is appreciated!
I am having issues with my URL Formula field not executing all my actions. If I comment out either one, it works, but it seems as though when it executes one action, the rest get ignored. Also, I am not great with coding, so I may have a really simple theory or format mistake. Basically, I have a button and I need it to send an email with a download link from the "Sketch" or "Updated Sketch" field to a specific user for approval while also updating the "Sent for Approval" field with the current date.
Currently, I can do one or the other depending on which command I comment out, but not both; if none are commented out, it just executes the first command. So, is there a way to execute this all at once? Or perhaps a better way?
Other Parameters:
-My key field is [WR #]
-[WR #] -> fid = 10
-[Sketch] -> fid = 71
-[Updated Sketch] -> fid = 91
Here is my code:
-------------------------------------------------------------------------------------
var text URLONE = "MailTo:someone@someplace.com"
//&"?cc=user2@domain.com; user3@domain.com; user4@domain.com"
&"&subject=WR for Approval"
&"&body=WR "&[WR #] &" is ready for approval."&"%0A%0A" &"Below is the download link for the sketch:" & "%0A" &
If(
[Updated Sketch]="",
"https://pike.quickbase.com/up/"; & Dbid() & "/a/r" & [Record ID#] & "/e71/v0",
"https://pike.quickbase.com/up/"; & Dbid() & "/a/r" & [Record ID#] & "/e91/v0"
);
var text URLTWO = "https://pike.quickbase.com/db/bmwn5ta2x";
& "?a=API_EditRecord&key=" & [WR #]
& "&_fid_50=" & ToText(Today()) & "&apptoken=myapptoken";
var text URLTHREE = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$URLONE
&
$URLTWO
&
"&rdr=" & URLEncode($URLTHREE)
-------------------------------------------------------------------------------------
All help is appreciated!