Forum Discussion
- MCFNeilQrew CaptainAre you asking to edit the record you are on first then go to the new form? Or, When you get to the new form change the Marketing Rep?
Either way, they are both possible.
Just need the field ID of the "Marketing Rep" and use the formula "User()" as the value to be written.
If you post your formula, and the field ID, I can help with the syntax - MannyCruzQrew Assistant CaptainThe first bit, yea! I need it to edit the record I am on first, then go to the new form on a new table.
Here is what I have so far,
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&AppToken=" &
"&rid=buawcnbd5pjszvdimycfs3jdpzd" &
"&rid=" & [Record ID#] &
"&_fid_107=" & URLEncode(User()) &
"&rdr="&
URLRoot() & "db/" & [_DBID_APPOINTED_LEADS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Agency Name])& "&z=" & Rurl())
I am fairly new to QuickBase but I have become knowledgeable enough to be dangerous, but API calls are not my strong suit at all. So this may be a really bad formula - MannyCruzQrew Assistant CaptainSorry, bothced it in the copy.
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&AppToken=buawcnbd5pjszvdimycfs3jdpzd" &
"&rid=" & [Record ID#] &
"&_fid_107=" & URLEncode(User()) &
"&rdr="&
URLRoot() & "db/" & [_DBID_APPOINTED_LEADS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Agency Name])& "&z=" & Rurl())- MCFNeilQrew CaptainYou just need to use a "URLEncode()" for the RDR portion.
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&AppToken=buawcnbd5pjszvdimycfs3jdpzd"&
"&rid="&[Record ID#]&
"&_fid_107="&URLEncode(User())&
"&rdr="&
URLEncode(URLRoot() & "db/" & [_DBID_APPOINTED_LEADS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Agency Name])& "&z=" & Rurl())
That should do it for you. - MannyCruzQrew Assistant CaptainYes! Thank you so much, it worked!
- MannyCruzQrew Assistant CaptainIf it helps, this formula does change the Marketing Rep to the current user, it just doesnt re direct to the Gen Add Form in the other table.
- MichaelGraham2Qrew Assistant CaptainI took this from the Magic Buttons App.
It might give you the right idea.
URLRoot() & "db/" & [_DBID_CLIENT] & "?a=API_EditRecord&apptoken=d9eascudwjxs2sesxkjccwgtq9r&_fid_28=Completed&_fid_153=Completed&_fid_143=100&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_PROJECT_SNAPSHOTS] & "?a=API_AddRecord&apptoken=d9eascudwjxs2sesxkjccwgtq9r&_fid_6=" & [Project Name] & "&_fid_7=" & [Status] & "&_fid_8=" & [Priority] & "&_fid_9=" & [Est Start Date] & "&_fid_10=" & [Est End Date] & "&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]))
// Edit the record and change the status to Completed then redirect to
// Adding a Project Snapshot record to the Project Snapshot table then redirect to
// displaying the original record - MannyCruzQrew Assistant CaptainI'm a bit too new to QuickBase to really try and modify this formula, but I will give it a try. I can kinda see how it would help.
Thank you - QuickBaseCoachDQrew Captaini have put an application in the exchange called URL Formuals for Dummies. It explains who to string URLs together.
But here is what should work for your example. I like to use "formula variables" as it makes the formuals much easier to read.
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&AppToken=buawcnbd5pjszvdimycfs3jdpzd" &
"&rid=" & [Record ID#] &
"&_fid_107=" & URLEncode(User())
var text URLTWO = URLRoot() & "db/" & [_DBID_APPOINTED_LEADS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Agency Name])& "&z=" & Rurl())
$URLONE
& "&rdr=" & URLEncode($URLTWO) - MannyCruzQrew Assistant CaptainAwesome, I dont really know much about variables, but this is giving me an error saying variable declarations must end in semicolons. I have put a semicolon everywhere I believe a declaration is over, but its giving me the same error, any help?
Thank you so much!! - QuickBaseCoachDQrew CaptainRight, I'm missing the ending ;
trey this
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&AppToken=buawcnbd5pjszvdimycfs3jdpzd" &
"&rid=" & [Record ID#] &
"&_fid_107=" & URLEncode(User());
var text URLTWO = URLRoot() & "db/" & [_DBID_APPOINTED_LEADS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Agency Name])& "&z=" & Rurl());
$URLONE
& "&rdr=" & URLEncode($URLTWO) - MannyCruzQrew Assistant Captainvar text URLONE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&AppToken=buawcnbd5pjszvdimycfs3jdpzd" &
"&rid=" & [Record ID#] &
"&_fid_107=" & URLEncode(User());
var text URLTWO = URLRoot() & "db/" & [_DBID_APPOINTED_LEADS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([Agency Name])& "&z=" & Rurl() );
$URLONE
& "&rdr=" & URLEncode($URLTWO)
This is the error I keep getting