Expand all | Collapse all

Report report with dynamic filter applied?

  • 1.  Report report with dynamic filter applied?

    Posted 11-15-2019 00:01
    Is it possible to load a report with dynamic filter applied ? 
    I tried saving the bookmark of a report with applied filter but that didn't work


    Gunsham Lakhiani

  • 2.  RE: Report report with dynamic filter applied?

    Posted 11-15-2019 08:36
    I used a button yesterday and got a little help from someone on this. Note the URLEncode field as the value and also replace the %20 with \"

    URLRoot() & "db/bpnnzrjnw?a=q&qid=8#dynamic/{\"sidebar\":[{\"facetid\":12,\"data\":{\"value\":\""&URLEncode([Project Name])&"\"}}],\"searchString\":\"\",\"ver\":1}"

    Jason Johnson

  • 3.  RE: Report report with dynamic filter applied?

    Posted 11-15-2019 09:43
    %20 is actually a URL encoded space ( ), so I believe all of the %20 should be replaced with a space. %22 is a URL encoded quote ("), and those are the ones that should be replaced with \". I think the following formula should work:
    URLRoot() & "db/" & Dbid() & "?a=q&qid=19#dynamic/{\"sidebar\":[{\"facetid\":16,\"data\":{\"value\":\"B/L Awaiting\"}},{\"facetid\":16,\"data\":{\"value\":\"B/L Sent\"}},{\"facetid\":16,\"data\":{\"value\":\"Payment Received\"}}],\"searchString\":\"\",\"ver\":1}"


  • 4.  RE: Report report with dynamic filter applied?

    Posted 11-15-2019 10:13
    Edited by Adam Keever 11-15-2019 10:29
    For others reading this that aren't familiar with how you derived the string, open a report, apply the dynamic filters you want to use, then copy the URL from your browser then make the following modifications to the string:

    Example copy & paste from browser:

    Search and replace %22 with \" and wrap the whole string in quotes


    There is no need to change the characters for the dynamic values. Copy & paste the modified string into a formula URL field and add that field to a report or form and it will open the report with the dynamic filters applied.

    Tom's code should work, but you don't have to replace the %20. For that matter your original code should work if you just wrap it in quotes and add the backslashes


    This version of my example works


    Adam Keever

  • 5.  RE: Report report with dynamic filter applied?

    Posted 11-16-2019 00:48
    I apologize in advance for more questions.  I'm still unable to get this working. 

    My reports opens without the filter 
    • As Jason suggested , I've tried replacing %20 with \" ,
    •  As Tom suggested , I made a formula which %22 with \"
    •  As Adam in detail suggested , I copy pasted form browser and replaced %22 with \" and wrapped in a quote 

    Gunsham Lakhiani

  • 6.  RE: Report report with dynamic filter applied?

    Posted 11-18-2019 08:15
    Below is my rich text formula button that opens in a new tab. I did notice that if the report did not have records when I dynamically  filtered that it looked like no filters applied. I ended up using the table to table to create a summary of all records in that status and only if there were records in that status did the button show. No harm in hiding the button if nothing is there to show. I know you can do the same with a URL Formula field as well but I almost never use those.

    // Original URL https://MYQUICKBASEURL/db/bpnnzrjnw?a=q&qid=8#dynamic/{%22sidebar%22:[{%22facetid%22:12,%22data%22:{%22value%22:%22WHERE I INSERTED MY SEARCH PARAMETERS%22}}],%22searchString%22:%22%22,%22ver%22:1}
    // Begin button style
    var text bgcolor = "#006666";
    var text bgcolorm = "#00b3b3";
    var text txtcolor = "white";
    var text style = "style=\"text-decoration: none; box-shadow: 3px 3px 1px #888888; background:" & $bgcolor & "; color: " & $txtcolor & "; border-radius: 3px; padding: 5px 8px; display: inline-block; font-weight: normal;font: 700 24px/1 \"Calibri\", sans-serif; \" onMouseOver=\"this.style.backgroundColor='" & $bgcolorm & "'\";\" onMouseOut=\"this.style.backgroundColor='" & $bgcolor & "'\"; text-align: center; text-shadow:none;";
    // End button style

    var text URL= URLRoot() & "db/bpnnzrjnw?a=q&qid=8#dynamic/{\"sidebar\":[{\"facetid\":12,\"data\":{\"value\":\""&URLEncode([Project Name])&"\"}}],\"searchString\":\"\",\"ver\":1}";

    If([# Approved Costs]>0,

    "<a " & $style & " target='_blank' href=" & $URL

    & "> Approved Costs </a>","")

    Jason Johnson