URL for opening grandparent record

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • In Progress

I’m working with three tables: Use Profiles, Sites, and Reports.

-        Sites is a parent to Reports

-        User Profiles is a parent to Sites

The User Profiles table has a Quick Base username field that I use as the reference proxy in the User Profiles to Sites relationship.

I’ve created a lookup field, Sites – Related User ID , in the Reports table that pulls the Related User ID from the Job Sites table lookup field Related User.

What I’d like to happen is that a user can be on a Report record, and click a button to open their profile in the Users Profile table in edit and additionally mark a checkbox field as true.

I messed around with trying to utilize the Sites – Related User ID at the end of a URL in a formula URL field but couldn’t get it right.

Thanks :)
Photo of Heather Bryant

Heather Bryant

  • 1,128 Points 1k badge 2x thumb

Posted 7 months ago

  • 0
  • 1
No problem,

When you need to link from one record to another and there is not an easy way to get there, then you just build your own hyperlink. 

Because I'm all about Stupid Simple (KISS) I always build them in the same format.

var text URL = URLRoot()  & "db/" & [_DBID_Table name that you get from Advanced properties in square brackets] & "?a=dr&rid=" & [Record ID# of the grandparent table]; // always end a formula variable with a semi colon.

var text Words= [Some lookup field brought down to identify the Grandparent];

// then this part is always the same (KISS)

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

That will display the Grandparent record.  (a=dr means action = Display Record).  You can also do a=er  (Action = Edit Record), however when you save it might land you somewhere unexpected if you go directly into edit mode.