click on an image - uses a report link to take the user to the record

  • 0
  • 1
  • Question
  • Updated 6 years ago
  • Answered
I have successfully created a report link between two tables (Customer and Best of Boulder Winners).

When you click on the report link on the report in the Customer table - it will take you directly to the related record in the table for Best of Boulder Winners (for that customer)

However - I am using an QB image (star) to signify that this customer is a Best Of Boulder Winner. I would like the user to be able to click on this image and they would be taken to the same direction as if using the report link I created.

Can this be done?

Thank you
Benecia
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb

Posted 6 years ago

  • 0
  • 1
Photo of KenFirch

KenFirch

  • 10 Points
Assuming you are using a Formula Text field for the image, and the "<img src..." tag, you should be able to add an anchor tag:

"<a href=\"m y.reportlink.com\">" &
"<img src=\"m y .imageurl.com\"></a>"
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
Yes indeed, using "<img src..." tag.
This is exactly what I was looking for, but how do I find the url for my report link? (which is a field in the Customer table).
Thank you so much !
Benecia
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
also - the report link is for a specific field match in each table (Customer and Best of Boulder Winners) so it needs to go to a specific record - which it does so correctly, when just using the report link on it's own.
Photo of KenFirch

KenFirch

  • 10 Points
While viewing your report link, you can click "More / Show the expanded URL" to view part of the URL used.  Copy everything from the "&query=" to the end to build your URL in your formula text field.

"<a href=\"" & URLRoot() & "/db/YOURDBID?a=q&query={'blahblahblah..." & \">" &
"<img src=\"m y .imageurl.com\"></a>"

In the curly braces part of the query string you'll see something like {'10'.EX.'123'}.  10 would be the field id in your related table, maybe named Related Customer.  And 123 is the Record ID# of the Customer record.
So your "&query=" would start with "&query={'10'.EX.'" & [Record ID#] & "'}&blah&blah&blah..."
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
I'm sorry - I still don't find. my report link is a column in a report, with the field being the report link. I'm not sure how to "view the report link"  what do you mean by that?
Photo of KenFirch

KenFirch

  • 10 Points
Can you post the formula for the your report link?
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
If([# of BOBS]>0, "<img src=\"h t t p s://images.quickbase.com/si/16/207-star.png\">" )
Photo of KenFirch

KenFirch

  • 10 Points
Sorry, asked for wrong info.  So when you click on any of your report links in your column, and click the 'More' dropdown at the top, and choose 'Show the expanded url for this report,' what does that say?
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
thanks for being patient with me. I also switched back to the old UI - to do this. Here's what it says:

The expanded URL for this form is:

?a=q&qt=tab&dvqid=-1000375&query={'16'.TV.'20857'}&opts=disprec.

(This is only of interest to the most technical of users)
Photo of KenFirch

KenFirch

  • 10 Points
Okay, I'm assuming that 20857 is the Customer Record ID#, and 16 is the Related Customer fieldID in the Best of Boulder Winners table, then try:

"<a href=\"" & URLRoot() & "db/BOBSDBID?a=q&query={'16'.TV.'" & [Record ID#] & "'}&opts=disprec\">" &
"<img src=\"h t t p s://images.quickbase.com/si/16/207-star.png\"></a>"

Replace BOBSDBID with the DBID of the Best of Boulder Winners table.
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
here is what I have:
If([# of BOBS]>0,"<a href=\"" & URLRoot() & "db/BOB?a=q&query={'16'.TV.'" & [Record ID#] & "'}&opts=disprec\">" &
"<img src=\"h t t p s://images.quickbase.com/si/16/207-star.png\"></a>")

Using that I get this error message:  Invalid Request
The QuickBase URL you specified was incorrectly formatted. If the link is correct, the problem may be a communication error between your web browser and QuickBase. Try accessing the URL again.

What am I doing wrong, please?
Photo of KenFirch

KenFirch

  • 10 Points
You'll need to replace "BOB" after the "db/" with the actual dbid of the table you are querying.  You can see the dbid in the url while viewing the report you are trying to display.  It's 9 characters, starting with a b.   This might help:

See http://quickbase.intuit.com/developer/knowledge-base/how-do-i-find-database-id-dbid-quickbase-table

And of course remove the spaces from "h t t p s."
Photo of benecia1111

benecia1111

  • 80 Points 75 badge 2x thumb
OH THANK YOU SO MUCH - that did the trick. I appreciate your patience. THIS WORKED !