JeffMickelsen
7 years agoQrew Cadet
Combine 4 URL's in one button
I have 4 URLs that each work fine by themselves. I downloaded the URL Formula Buttons for dummies and can combine three of the URLs using that example. However, I need to add a fourth url to the button and I can't figure out the syntax.
Below is listed what I have so far.
var text DeliveryDateInOS =
URLRoot() & "db/xxx?a=API_EditRecord" &
"&rid=" & URLEncode([DeliveryOrderSched]) &
"&apptoken=XXX" &
"&_fid_7=" & URLEncode([Dumpster Delivery Date] & " 12:00am") &
"&_fid_18=" & URLEncode([Dumpster Delivery Date] & " 12:30am");
var text PickUpDateInOS =
URLRoot() & "db/xxx?a=API_EditRecord" &
"&rid=" & URLEncode([PickupOrderSched]) &
"&apptoken=XXX" &
"&_fid_7=" & URLEncode([Dumpster Pick-up Date] & " 1:00am") &
"&_fid_18=" & URLEncode([Dumpster Pick-up Date] & " 2:00am");
var text ProcessRec =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Order Number] &
"&apptoken=XXX" &
"&_fid_77=0" &
"&_fid-434=1"&
"&_fid_447=1"&
"&_fid_79=" & URLEncode(Trim(ToText([Dumpster charge - DumpsterCost]))) &
"&_fid_169=" & URLEncode(Max([ZipCodeReference - MileageCharge],0)) &
"&_fid_71=1" ;
$DeliveryDateInOS &
"&rdr=" & URLEncode($PickupDateInOS) &
URLEncode("&rdr=" & URLEncode($DeliveryDateInOS)) &
URLEncode("&rdr=" & URLEncode(URLRoot() & "db/" & Dbid()&"?a=dr&rid="&[Order Number]))
Obviously, I have overwritten the DBID and the AppToken for each url.
Can anyone shed some light on what I am doing wrong?
Below is listed what I have so far.
var text DeliveryDateInOS =
URLRoot() & "db/xxx?a=API_EditRecord" &
"&rid=" & URLEncode([DeliveryOrderSched]) &
"&apptoken=XXX" &
"&_fid_7=" & URLEncode([Dumpster Delivery Date] & " 12:00am") &
"&_fid_18=" & URLEncode([Dumpster Delivery Date] & " 12:30am");
var text PickUpDateInOS =
URLRoot() & "db/xxx?a=API_EditRecord" &
"&rid=" & URLEncode([PickupOrderSched]) &
"&apptoken=XXX" &
"&_fid_7=" & URLEncode([Dumpster Pick-up Date] & " 1:00am") &
"&_fid_18=" & URLEncode([Dumpster Pick-up Date] & " 2:00am");
var text ProcessRec =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Order Number] &
"&apptoken=XXX" &
"&_fid_77=0" &
"&_fid-434=1"&
"&_fid_447=1"&
"&_fid_79=" & URLEncode(Trim(ToText([Dumpster charge - DumpsterCost]))) &
"&_fid_169=" & URLEncode(Max([ZipCodeReference - MileageCharge],0)) &
"&_fid_71=1" ;
$DeliveryDateInOS &
"&rdr=" & URLEncode($PickupDateInOS) &
URLEncode("&rdr=" & URLEncode($DeliveryDateInOS)) &
URLEncode("&rdr=" & URLEncode(URLRoot() & "db/" & Dbid()&"?a=dr&rid="&[Order Number]))
Obviously, I have overwritten the DBID and the AppToken for each url.
Can anyone shed some light on what I am doing wrong?