Forum Discussion

RobinCC's avatar
RobinCC
Qrew Cadet
9 years ago

How do I see the resulting records from using the API_DoQuery?

I'm very much a beginner when it comes to using the API, so likely I just don't understand the whole process....

I'm messing with the following DoQuery example which was used at the Empower conference last month. https://team.quickbase.com/db/bkuk3wb7q?a=dr&rid=3&rl=b94

When I copy and paste this into a code page and click preview, the screen is blank. Why is this? How do I see the list of records that meet the criteria? If you look at the request, it is supposed to display all the records in which fid #13 is equal to High and fid #12 is not equal to Completed and it is to show only fid #'s 56, 6, 67, and 10.

What am I not understanding?

Also, is there a resource on the internet where someone like me can learn this stuff?  Everything I ever look at is way too technical for me, hence the reason for this post.   
Thanks
  • Updated:

    I now see the post you linked to is the API Cookbook.

    What you describe can be achieved simply by building a report in the table where these records exist and create filters set so that field ID# 13 ="High" and field ID#12 is not equal to "Completed" and then to only show fields 56, 6, 67 and 10.  Note that in the Report Builder you will make all these field selections by the Field Name, not by the Field ID#.


    When you build a report like this, you can actually access the URL that is generated by clicking on the MORE when displaying the report and choosing the last option "Show the expanded URL for this report" which will show you the construct of the URL.

    For what reason are you creating a code page?


    Feel free to reach out to me using my profile https://quickbase-community.intuit.com/users/537-quickbasepros_ids if you need some assistance on Monday.
  • Hi Laura,
    Thanks for responding.   I don't understand why I get the results I'm getting when following the example in the link I posted above.  In particular, why is the screen blank?   I'm just trying to better understand the DoQuery API, and the API in general.  

    I'm also looking for a better resource for the API, not the QuickBase API Guide which is just a technical resource, but something that explains the all the foundations to someone at my level.
  • Hi Laura,

    I'm testing the API_DoQuery with the following code and I'm not getting any result. Could you help me?

    var promise = $.get(dbidcalendar, {

    act: "API_DoQuery",

              query: "{3.EX.178}",

              clist: "3"

    });

    $.when(promise).then(function(xml){

    var recordid = $("rid", xml).text();

    });


    I use something similar for API_AddRecord and API_EditRecord and it works very well. The APP does not have APPTOKEN
    • CarlosCarlos's avatar
      CarlosCarlos
      Qrew Assistant Captain
      Hi,
      is there a way to not use the field name, but use the field ID instead?
      from: $("rid", xml).text();
      to:      $('23', xml).text();