Forum Discussion

GeorgeBramhall2's avatar
GeorgeBramhall2
Qrew Cadet
3 years ago

filtering a query using URL text formula field

Can I use this URL Text Formula field (button) to query a report but show related records? This button sits in the Parent table record of this child table DBID_PLC. If Yes, What do I need to add to make this work? 

URLRoot() & "db/" &[_DBID_PLC]&"?a=q&qid=6";

------------------------------
George Bramhall
------------------------------

6 Replies

  • no problem,

    1. Make your perfect report with an <ask the user> filter for related parent.
    2. Run the report and answer the question and observe the URL:

    Then make a formula to mimic it.

    URLRoot() & "db/" &[_DBID_PLC]&"?a=q&qid=6&nv=1&v0=" & [Record ID#];

    If we translate that URL into plain English it says go to my realm and then go to this table and run Report number six and it will ask you for one value (nv=1)  and the answer to the 0th value is [Record ID#]

    If Report had two values to be answered then it would read like this &nv=2&v0= something & v1= something.

    ie it starts numbering at zero.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • OanaWhalen's avatar
      OanaWhalen
      Qrew Cadet

      How would you accomplish this if the field type used in the ask the user filter is text? I have done this previously by just using a URLEncode around my text field, but this no longer works in the new table reports.


      If the field I am filtering on is [Building Name] and I want to pick Building One, URLEncode([Building Name]) gives me Building%20Name. However, if I manually go to the report containing the ask the user filter and select Building One, the end of the URL is "v0=Building-One". I could try to replicate this with a search and replace, but what if the name doesn't have a space but another special character? Currently almost everything I try results in "v0=" with nothing following it when I open the report via my url, and of course it is not filtering in that case.


      Edited: The filter actually seems to work fine now, even without the URLEncode. I was having trouble with it last night, and adding the &ifv=1 made things worse. All seems to be working correctly now, so I must have made another error along the way. Leaving the post for reference that the same process for filtered reports works on non-numeric fields.

      ------------------------------
      Oana Toma
      ------------------------------
    • GeorgeBramhall2's avatar
      GeorgeBramhall2
      Qrew Cadet
      I would rather not ask the user. Since I am in the Parent record, Can't I some how grab the Record ID for the Parent record and use that to fetch all the related child records in the report?

      ------------------------------
      George Bramhall
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        No, you are not understanding. The whole point of that formula is to run the <ask the user> report and answer the question and display the report immediately to the user upon click.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------