Forum Discussion

Re: API_DoQueryCount with parameterized saved query (qid)

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
------------------------------

1 Reply

  • ShaneDavis's avatar
    ShaneDavis
    Qrew Member
    This works, much appreciated! Code was already calling API_GetSchema to get some other metadata, thus, it was very easy to implement, but guess I was too frustrated last night to see the answer before me.

    FWIW, using QIDs so that others can create/maintain reports to be shown in a JS app without the involvement of developers. Thanks again!

    ------------------------------
    Shane Davis
    ------------------------------