Forum Discussion

QuickBaseAdmi10's avatar
QuickBaseAdmi10
Qrew Cadet
13 days ago

Expanded URL to Formula Query

Hello,
I am hoping someone much smarter than I can help solve this puzzle.
I have a report on an activities table. I want to search the same parameters that the report has within a size(GetRecords()) formula query in order to showcase how many records the user can expect to generate. 
The first thing I did was to go to the report, unswitch the 'new style', choose 'more', and then select "show expanded url for this report". 
Which gives me this (made minor change to allow the formula query to save):

Size(GetRecords((("{'33'.IR.'this+wk'}OR{'33'.BF.'today'})AND{'76'.XEX.'No+Street+Address'}AND{'61'.XEX.'No+Employer+Name'}AND{'68'.XEX.'0'}AND{'19'.EX.''}AND{'82'.EX.'Send+Letter'}AND{'60'.XEX.'ABC'}AND{'69'.XEX.'Paid'}AND{'69'.XEX.'Promise+to+Pay'}AND{'69'.XEX.'Escalated'}AND{'17'.EX.'Delinquent+in+30+days'}")), [_DBID_ACTIVITIES]))

The above expanded url equals the below (report parameters)

How can I modify this expanded url and turn it into a workable formula query?
Any and all tips/ tricks are welcomed. 

Thank you!

  • I will bet you a hamburger that you can write a query that matches those parameters but it will not work.    That is too many variables for a formula query to swallow.   I will often get the failure message when my only parameter is

    {3.EX.'" & [Record ID#] & '"}

    Formula queries are very fragile.  I crippled a clients main application last week when I was testing what I though was a small one.   I had to open a Support Case to get the application back up and running.   The complexity of the query, yours is very high, and the size of the table combine to cause the instability.

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Actually, I'm with Don here.  What I always do with anything remotely complex is to make a formula checkbox field to match the report filters.  Then check that the record count matches for qualifying records.  Then the formula query is stupid simple. 

      var text QUERY = "{99.EX.1}";

      Size(
      GetRecords($QUERY))

      // Replace the 99 with the formula checkbox field ID#

      • DonLarson's avatar
        DonLarson
        Qrew Elite

        This is a much better idea than putting the pieces in a formula query.