Discussions

Expand all | Collapse all

Dynamic Filter from a Button

Jump to Best Answer
  • 1.  Dynamic Filter from a Button

    Posted 28 days ago
    For another use case I made a button that would go to a report where is was set to ask the user. The button contained the following and it works great.
    a=q&qid=11&nv=1&v0="&[Related Customer]

    I now have a use case where I can't use the ask user but need to use the dynamic filter.  I have tried using the following
    "db/bpnnzrjnw?a=q&qid=8#dynamic/{%22sidebar%22:[{%22facetid%22:12,%22data%22:{%22value%22:%22"&URLEncode([Project Name])&"%22}}],%22searchString%22:%22%22,%22ver%22:1}"

     I added in a URLEncode of the dynamic filtered field. The part after the field brackets in the formula is highlighted green until the next bracket end. It is like Quick Base wants to only recognize the second closing bracket as the closing bracket. Any ideas on what I can change to make this work? yes I realize I could make additional reports specifically for this button like the other button but there are other use cases I have if I can do this.

    ------------------------------
    Jason Johnson
    ------------------------------


  • 2.  RE: Dynamic Filter from a Button
    Best Answer

    Posted 28 days ago
    Assuming you're using a Formula - URL field as a button, try replacing all of the %22 with \". I was able to get it to work using the same structure as you have by simply performing this replacement.

    ------------------------------
    -Tom
    ------------------------------



  • 3.  RE: Dynamic Filter from a Button

    Posted 28 days ago
    Absolutely brilliant, I replaced the %22 and it works perfectly. I love it and just to add on if you use rich text formula field for buttons (my personal preference) it is works the same. Quick Base still highlights part of the formula in green but that does not an on affect the function.  Tom you are the man on this one!!

    ------------------------------
    Jason Johnson
    ------------------------------



  • 4.  RE: Dynamic Filter from a Button

    Posted 28 days ago
    Jason,

    Other than trying to decipher the URL for a report, do you have syntax for calling the qid with the dynamic filters set? 

    This could be very useful but I hate having to hunt and peck to figure out how to build the URL.

    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------



  • 5.  RE: Dynamic Filter from a Button

    Posted 28 days ago
    I went to the report, did the dynamic filter then copied the url. Then I made the adjustments mentioned in my reply.

    ------------------------------
    Jason Johnson
    ------------------------------



  • 6.  RE: Dynamic Filter from a Button

    Posted 28 days ago
    Try
    URLRoot()&"db/"&Dbid()&"?a=q&qid=8#dynamic/{\"sidebar\":[{\"facetid\":12,\"data\":{\"value\":\"FILTER%20DESCRIPTION\"}}],\"searchString\":\"\",\"ver\":1}"​

    and replace FILTER%20DESCRIPTION with the text that you want your dynamic filter set to and it doesn't matter if you use the %20 or a space.

    So for example if you want the filter for your [Project Name] filed to be Project 1, then change FILTER%20DESCRIPTION to Project 1 or Project%201.

    ------------------------------
    Adam Keever
    ------------------------------