Running report while editing a record

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have restricted users to dashboard to add data to form and all reports are run the dashboard.  However, this will much convenient if they could run a report while in the form editing a record. Is this achieved through creating a URL link?  Will appreciate some help.  
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb

Posted 2 years ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
You can make a link to run a report using a URL formula button.

Urlroot() & "db/" & [_DBID_ of the table name goes here] & "?a=q&qid=xx"

Where xx is the query ID #
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks a lot Mark.  Could this be amended to run the report for the project I am on?  By the way report itself is in the linked child table?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
right, so you want to run a report which sort of needs user input, but you don't want to do the user input yourself.

no problem

Make an <ask the user> report which asks the user for the [Related Project].  Run the report and answer the question and observe the URL

it will read like

mycompany.quickbase.com/db/xxxxxx?"a=q&qid=XX&nv=1&v0=12345

so that says to run report number XX and it will have nv=1 means number of variables  = 1 variable - ie one question to be answered, and the answer to the zeroth question (don't ask me why but it starts counting at zero) is 1234 (hence V0=1234.  if there were two ,ask the user> questions, then it would also use &v1= to answer the 2nd question.


So thence the URL formula is this


URLRoot() & "db/" [_DBID_of the child table] & ?"a=q&qid=XX&nv=1&v0=" & ToText([Record ID#]

so that above button is sitting on the project record and it run report # XX on the child table where normally that report would ask you a question as to "which project' it just goes ahead and answers its own question by responding with the with the [Record ID#] of the Project you are sitting on.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks a lot.  Great explanation.   However, my syntax is still not acceptable for some reason.  I think the placement of quotation mark after table name needs some balancing. I tried adding quotes after '7' but does not work.

URLRoot() & "db/" & [_DBID_STAGING_PLAN]& "?a=q&qid=7&nv=1&v0="& ToText([Record ID#]
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
You are missing a closing ) at the very end, to close the ToText(
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks a lot.  That was the issue.  But for some reason, it is still full report running.  My report is designed to run all projects and I expect that when I click the button, it should only report on the project I am in.

My syntax looks like this and I have compared the last part by changing the report to 'ask the user':

URLRoot() & "db/" & [_DBID_STAGING_PLAN]& "?a=q&qid=7&nv=1&v0="& ToText([Record ID#])
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
You will need to create a brand new report. So this will not be query ID number seven it will be a brand-new report. The report needs to have a filter on it that says where [related project] equals ........ and then you select ask the user as a choice.

 When you run the report manually it should ask you for which project's children you are wanting to see.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks a lot.