Forum Discussion

LijaHarris's avatar
LijaHarris
Qrew Trainee
2 years ago

Get Next Record ID API for a table and display on a Code Page

I was wondering if it is possible to use the API_GetSchema to retrieve the next record id from a specific table - query that and display the result on a code page?  Basically I have a code page in HTML and Java that is a customer intake form.  What i would like to give the customer is a unique id or code to reference once they have submitted their form.  I would like to use the record ID as this code but having trouble putting that information on the code page.

------------------------------
Lija Harris
------------------------------

2 Replies

  • if you are using the addrecord API, I think you should show the code that returns after the operation was successful.  Evaluate the request after the add operation is complete.

    Marcelo Benavides Torres


    • LijaHarris's avatar
      LijaHarris
      Qrew Trainee
      So after the code is successful, it directs the user to a thank you html page.  Ideally i would like the thank you page to display the most recent record id (which would be their code), however, i think that would be trickier so i am fine with the next record id to show on the intake form.

      Code:

      <h2 span style="color: white; font-family: Sans-serif; text-align: center; background-color: #358281;">Customer Data Intake Form</h2><form name=qdbform method=POST onsubmit='return validateForm(this)' encType='multipart/form-data' action=https://xxxxxxx.quickbase.com/db/xxxxxxxxxxx?act=API_AddRecord&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
      <input type=hidden name=fform value=1>

      At the end of the code page:
      </table><input type=hidden name=rdr value='https://cxxxxxxxx.quickbase.com/db/xxxxxxxxx?a=dbpage&pageID=2'>
      <input type=submit value=Submit>

      ------------------------------
      Lija Harris
      ------------------------------