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

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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
Photo of Robin CC

Robin CC

  • 240 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of QuickBasePros (Laura Thacker)

QuickBasePros (Laura Thacker), Champion

  • 6,396 Points 5k badge 2x thumb
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.
Photo of Robin CC

Robin CC

  • 240 Points 100 badge 2x thumb
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.
Photo of Alvaro Guerrero

Alvaro Guerrero

  • 0 Points
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
Photo of Carlos

Carlos

  • 836 Points 500 badge 2x thumb
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();