Forum Discussion

JenniferJuhasz's avatar
JenniferJuhasz
Qrew Cadet
4 years ago

API_Add Record >> Redirect to Thank You Page - Token Not Recognized

Hi everyone,

I'm fairly new to QuickBase still; and am so appreciative the community here as reading through your discussions that are similar to my question helped me get this far.  So thank you!

I'm still puzzled, however, on how to write a URL Formula to redirect to a Rich Text Thank You Page.  We have a lot of EOTI Surveys, and on pressing Submit, I want to make it clear the submission was received and thank the user for their time.

My current code reads as:
URLRoot() & "db/" & [_DBID_ITK_ATTENDEE_SURVEY] & "?a=API_AddRecord&AppToken="&[ItK-Token]&"=Approved"&"&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=dbpage&pageID=2&ifv=1")

But I still receive the error: 
<qdbapi>
<action>API_AddRecord</action>
<errcode>24</errcode>
<errtext>Invalid Application Token</errtext>
<errdetail>An Application Token must be supplied.</errdetail>
</qdbapi>

I've verified that I DO have a functional Application Token; I applied to a Variable when the code wouldn't accept the token directly in it (it kept looking for a Text string?).

I've been reading through this help guide: Configure URL Fields and this one: Using ""&z=""&Rurl() and rdr in formula URL fields
I'm Totally puzzled why the sample formula provided for this purpose includes a rid and fid demarcation, when the goal is to submit a record and redirect to a Thank you Page.

Can someone help me understand why my formula isn't working?  
Is there a guide that helps break down the parts of formulas more clearly and provides a step-by-step roadmap?  

Thank you so much,

Jen


------------------------------
Jennifer Juhasz
------------------------------
  • I think that in fact you want to put up an Add Record form as opposed to actually adding a record.  if a human user is Saving a record on a manual form, then you do not need an App Token.

    Try this syntax

    URLRoot() & "db/" & [_DBID_ITK_ATTENDEE_SURVEY] & "?a=API_GenAddRecordForm"

    & "&NextURL=" &URLEncode(URLRoot() & "db/" & Dbid() & "?a=showpage&pageID=2&ifv=1")



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • JenniferJuhasz's avatar
      JenniferJuhasz
      Qrew Cadet
      Hi Mark,

      Thank you so much for taking a look.  I love the simplicity of your suggestion, but it results in a pop-up that says "You must save this Response first".  

      Is there not a way to code a 'Submit' button that saves the record to the table and takes a person to a Thank You page?

      Thank you again!

      ------------------------------
      Jennifer Juhasz
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        I think that we need to take a step back here.

        What are you trying to do?  Where is the user launching from?


        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------