Adding a button to one report that references a report from another table filtered by Record ID#

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • Answered

I want to create a button on a report that references a timeline report from another table. Both tables are in the same application and linked by Record ID#. I want the timeline report (child table) that is launched from then main report (parent table) to be filtered to show only records that link. Also, I want to change the name of the button but the "Text Link" field doesn't appear to be overwriting the URL.

I've tried: "https://my company.quickbase.com/db/tableID?a=q&qid=16" - with "16" being the report number in the child table. I get the all timeline records not just those associated with the parent record. I tried adding & [Record ID#] at the end and received an error.

I've tried: URLRoot()  & "db/" & [_DBID_Child Table Name] & "?a=q&qid=16&nv=1&v0=" & [Record ID#] and failed to get the desired results.

I also tried: URLRoot ()&"db/"&Dbid(child table ID)&"?a=q&qid=16&nv=1&v0="&[Record ID#] and this errors out completely.

I've filled in the box for "Link Text" but this doesn't override. I have checked "Don't show 'http:..." I've checked "Display as a button" and "Display in bold" which does work.

Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 2
I think that I understand what you want.

Make your perfect target report and include a filter with an <ask the user> for the filter for the records that you want on the report.  I can't quite tell what that is, but likely it's whatever the Parent record ID# is.




Then make a formual URL field like this

URLRoot()  & "db/" & [_DBID_Child Table Name] & "?a=q&qid=XX&nv=1&v0=" & [Record ID#] 


where XX is your report ID.



That should work.  I think that you did everything correct except that you did not first build an <ask the user> report.
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
I receive a "Formula error -- Unknown Field."   It states the table does not contain a field "_DBID_Incident Timeline" - this is the name of my table.  Just to be sure, the field type is a formula URL and not just URL.  Also, will the "ask the user" be pushed in by the formula?  I don't want my users to have to know what this value is.
Can you please post your formula, copy and paste it in please.
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
URLRoot()  & "db/" & [_DBID_Incident Timeline] & "?a=q&qid=16&nv=1&v0=" & [Record ID#]
Your [_DBID_Incident Timeline] is incorrect.  Go back and copy and paste it correctly.  My guess is that it need an underscore between Incident and Timeline
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
That didn't resolve the issue.  May I send you screen shots?
You can edit your original question to post screen shots.
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
Done
Did you simply add in an underscore or did you check the advanced properties of the incident timeline table and  copy and paste the table name into the square brackets?  It is trying to tell you that the table name is incorrect.
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
I replaced this with the Table Alias and it works like a champ.  I'm sorry if this is something I should have known to do.  Thank you!
so the button works now?
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
Yes it does.  The Table Alias for all my other tables is the same (with the addition of _DBID_) but for some reason for this table, the alias is different .. rather than _DBID_Incident Timeline ... it is _DBID_TABLE_1.  I didn't think to check this before.  Using the alias resolved the problem.  And, the Link Text also displays correctly.
The table alias never changes after it is created.  So initially you created the app and did not give the table a name, so it defaulted to call itself Table_1 for evermore as the table Alias.  Then you decided that was not such a good name for your table and gave it a more meaningful name.
Photo of Christy Beller

Christy Beller

  • 70 Points
Can i do this with a summary report linked to a report from another table?
well, maybe describe in more detail.
Photo of Christy Beller

Christy Beller

  • 70 Points
Im trying to add a calculated column to a summary report that links to table report from another table. I have a summary report in my JOBSITES table that I want a clickable link or button in that report that takes me to a table report in my INSPECTIONS table.  The first problem is I cant seem to get it to add a calculated column to the summary report no matter what.  Not sure if its permissions or if I just cant put a calculated column in a summary report. Sorry Im a newbie.
You should be able to create a calculated column by selecting <calculated column> for what field to Summarize or to group by.

If you want to have a link to go to other that the default drill down behavior,  you can make a hyperlink field  to where you want to link to and have that as a row or column grouping.

here is an example of a hyperlink - formula text field with html enabled.

var text URL = URLRoot() & "db/" & [_DBID_PATIENTS] & "?a=dr&rid=" & [Related Patient];

var text Words = [Patient Name];

"<a href=" & $URL & ">" & $Words & "</a>"