API_DoQuery and API_DoQuery can't find values

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Originally posted  in previous community:
Hi Everyone, need help Below is my query, i have the field id of 419 and the field value is 12345. That value already exist. But it gives me 0 count. is there something wrong with my code? Thanks

&a=API_DoQueryCount&query={'419'.EX.'12345'}
Photo of Dan G. (QB Support)

Dan G. (QB Support), Official Rep

  • 490 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Dan G. (QB Support)

Dan G. (QB Support), Official Rep

  • 490 Points 250 badge 2x thumb
Answer

Do you have a "?" character in your URL to define where the query string starts?

?a=API_DoQueryCount&query={'419'.EX.'12345'}

To debug this paste the following code into the Chrome Dev console substituting your dbid, apptoken and the val variables.

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=551

The code will report the XML structure of all records which have a text value of val within the one of the fields. See attached screenshot where I search the Formula Functions Reference table for those records which contain the value "UserToName" in one of its fields.


screenshotjpg
screenshot.jpg



Was this answer helpful?

Answered by:
Original
dandiebolt_QB_Pirate , Pres. of Service Worker Union
QuickBase Pro 20 days ago