Forum Discussion

Re: API Boot Camp App

I don't think your request is returning any rows.  The problem is with the processRecords function, it doesn't check for errors.  This line is the culprit:
xml.find('qdbapi').find('record').each(function(index)
It assumes each 'find' actually get a result, but it doesn't appear to be.
I updated your code to match one of my test environments and the problem is (most likely) that no records are being returned.  I've attached an updated version of the code you supplied, and you'll see the changes in the processRecords function.  It should also log an error if you're getting a different issue.
Note if there was an api error you'll see the code in the log.
Let me know how it goes..
Neil

------------------------------
Neil Schneider
------------------------------

3 Replies

  • BobThomas1's avatar
    BobThomas1
    Qrew Cadet
    Hi Neil,

    Thanks for the debugging file.  I put in your javascript page in the api_doquery. So I am getting the debugging error. 

    There are two database tables. I want the search on 'bqiugimre' . I added it to the url variable in the program and with the token I created in my app. But the debugger is stopping on the 'bqiugimvj' database table. 

    Could that be the problem. I thought I changed it, but not sure what is going on, but I think the 'bqiugimre' is the one I want to read the data from?



    ------------------------------
    Bob T.
    ------------------------------
    • NeilSchneider's avatar
      NeilSchneider
      Qrew Cadet
      Bob,
      I should have deleted the debugger statement.  That stops the script from running so you can see what's happening.  Delete that line and try again.  Also the dbid should be of the table you want to read the records from.  The errors are reported in the else clauses of the if statements.
      Let me know..
      Neil

      ------------------------------
      Neil Schneider
      ------------------------------
      • BobThomas1's avatar
        BobThomas1
        Qrew Cadet
        Finally worked. Thanks Neil.



        ------------------------------
        Bob T.
        ------------------------------