Forum Discussion

ShaneDavis's avatar
ShaneDavis
Qrew Member
5 years ago
Solved

API_DoQueryCount with parameterized saved query (qid)

I have what I'd have expected to be a simple need: to get the # of records matching a saved query that requires one "ask the user" parameter. It seems that API_DoQueryCount when using a saved query...
  • NathanHawe's avatar
    5 years ago
    I don't think there is a way to provide query parameters when using an ID or query name.  I've always provided the query when I use the API, that has the added benefit of providing some change management since it's more difficult for other users to change my source code than a report in Quick Base.  If you're trying to use the QID because you're not sure how to construct the same query using the query syntax, you can use API_GetSchema on the table with the report and look for the qycrit element for the query with the same ID number and you can see the query syntax there.  All you have to do is replace the '_ask#_' with your parameters and you should be able to call API_DoQueryCount and get the expected results.

    ------------------------------
    Nathan Hawe
    ------------------------------