Forum Discussion
I'm not at my computer now so bear with me while I try to just answer on my iPhone while I'm waiting for takeout dinner.
no problem.
go to the target table and make your perfect report using ask the <ask the user> filters.
run the report, answer the question and observe the URL. He will see that it has a suffix like
&v0=MyAnswer
so never mind wishful thinking for perfect documentation, a lot of time, and Quickbase, we just monkey see monkey do. So you just have to create a URL string that will make the same string that you see in the URL.
by the way, if you had a ask the user report with three questions, then the extra parameters would be
&v0=
&v1=
&v2=
Quickbase likes to start counting from zero instead of one.
so the URL string would be like this
URLRoot() & "db/" & [_DBID_PROPERTY_METRICS] & "?a=q&qid=99&v0=" & URLEncode([my field with the answer])
obviously changed the 99 to the QID of your report.
I am not sure if that fully answers your question as you also asked a different question about linking our report link field to a certain report. If that was really your question, you just go to the form where the report link field is and set a report to use there. Whatever report you use will pick up the extra filter as defined by the matching conditions in the report link field itself.
set a report to use there. Whatever report you use will pick up the extra filter as defined by the matching conditions in the report link field itself.
This was mostly dictated so feel free to post back if you have any more questions.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- DonLarson10 months agoQrew Commander
Mark,
I am trying to make this work with a Report Variable instead of polluting the table with yet another field. When I have over the link in the first report it sure looks correct but when I click it, the variable is not being passed. I end up on the second report on the Ask the User screen.
Ever tried this variation?
------------------------------
Don Larson
------------------------------- MarkShnier__You10 months agoQrew Legend
.. sorry never tried making a Report Formula as a hyperlink to run an <ask the user> report.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------ - BrianSeymour10 months agoQrew Cadet
Hey Don and Thomas,
Here is a proof of concept using a Report Formula (of Type Formula - Rich Text) with a couple variables. You could add further styling as necessary via CSS. This example intends to mimic the standard grey Quickbase button styling by applying the Vibrant class to a link. We are using the "Pre-populated Ask The User" technique to basically simulate a User specifying two <ask the user> values if they were to manually run the report.
// We filter for records by pre-filling two <ask the user> values var number reportID = 999; var text url = URLRoot() & "db/" & [_DBID_YOUR_TABLE] & "?a=q" & "&qid=" & URLEncode($reportID) & "&nv=2" & "&v0=" & URLEncode([Your Field]) & "&v1=" & URLEncode("Your Value"); "<a " & "href=\"" & $url & "\"" & "rel=\"noopener noreferrer\"" & "class=\"Vibrant\">" & "Your Link Name" & "</a>"
Hopefully that helps!
------------------------------
Brian Seymour
------------------------------- DonLarson10 months agoQrew Commander
Brian,
Thank you for the detailed solution. It really helped me find my error.
I have posted your solution to the Community Repo. https://github.com/mcfindustries/Magic/blob/master/Community/Report%20Formula.quickbase
------------------------------
Don Larson
------------------------------