Forum Discussion

AdamKirchhoff's avatar
AdamKirchhoff
Qrew Member
9 months ago

API AddRecord - Error Code 50

Wondering if anyone has run into anything similar - I want to add an API AddRecord with a Formula URL that would eventually copy some information.  I was getting no errors, nothing, and eventually started stripping the formula down to the minimum requirements.

With only the three required fields, I started getting error code 50, specifically mentioning one of the three fields

<qdbapi>
<action>API_AddRecord</action>
<errcode>50</errcode>
<errtext>Missing required value</errtext>
<errdetail>Sorry, you did not supply a value for the required field named "Payment Source" with field id 46. Please provide a non-blank value for this field.</errdetail>
</qdbapi>
This is despite the fact fid 46 does have a value
URLRoot() & "db/" & [_DBID_runs] & "?act=API_AddRecord&apptoken=REPLACED-FOR-SECURITY" &
    "_fid_199=" & URLEncode("Accept") &
    "_fid_70=" & URLEncode("Coding") &
    "_fid_46=" & URLEncode("NOT KNOWN") & 
"&z=" & Rurl()

Just to test - I disabled the requirement for fid 46 and removed that section of the post.

Goes through without a problem.  Now I return 46 to required, add back into my call - back to error code 50.

Is there something I'm missing?  Anyone else have a similar issue?  I'd hate to remove a required field attribute because one API didn't like it - HAS to be something wrong here.



------------------------------
Adam Kirchhoff
------------------------------

3 Replies

  • Your syntax is incorrect.  For example  

    & "&_fid_199=" & URLEncode("Accept")

    you need & before the parameter. 



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • AdamKirchhoff's avatar
      AdamKirchhoff
      Qrew Member

      ...wow... I can't believe I ended up pushing this to the community - usually I would have found that by now LOL

      It's the double ampersands - you just helped me very much, and I feel like a noob.

      Thank you so much, Mark!



      ------------------------------
      Adam Kirchhoff
      ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Yes, and & can be confusing. They are used in two completely different ways in the syntax. 

      One use is concatenation similar to Excel to join two text strings together. 

      The other use is inside the quotes to indicate that s parameter follows.  



      ------------------------------
      Mark Shnier (Your Quickbase Coach)
      mark.shnier@gmail.com
      ------------------------------