ChristianRexach
6 years agoQrew Trainee
Have 2 API Formulas in one URL Button
I want to have a workflow where a Field Engineer makes a Request for a part and then if it's approved have Dispatch click a button which will create a new record on another table and also edit a checkbox on the original record letting us know it's been approved. I can get the 2 formulas to work individually but not together. Here are the 2 formulas I want to work on a single button:
Create new record on another table with data from this record:
URLRoot() & "db/" & [_DBID_PARTS] & "?act=API_GenAddRecordForm"& "&_fid_19=" & URLEncode([CSE - Full Name])
& "&_fid_20=" & URLEncode([Part Name/Desc. (s)]& "\n\n" &[Tool Name/Desc.])
& "&_fid_6=" & URLEncode([Part Number(s)]& "\n\n" &[Tool Number] )
& "&_fid_32=" & URLEncode([Equipment Name / Desc.])
& "&_fid_21=" & URLEncode([FL Number / Equipment Number])
Check the Checkbox:
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & If([Sent To Purchasing]=true, "&_fid_14=0", "&_fid_14=1")
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
Create new record on another table with data from this record:
URLRoot() & "db/" & [_DBID_PARTS] & "?act=API_GenAddRecordForm"& "&_fid_19=" & URLEncode([CSE - Full Name])
& "&_fid_20=" & URLEncode([Part Name/Desc. (s)]& "\n\n" &[Tool Name/Desc.])
& "&_fid_6=" & URLEncode([Part Number(s)]& "\n\n" &[Tool Number] )
& "&_fid_32=" & URLEncode([Equipment Name / Desc.])
& "&_fid_21=" & URLEncode([FL Number / Equipment Number])
Check the Checkbox:
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & If([Sent To Purchasing]=true, "&_fid_14=0", "&_fid_14=1")
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])