Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
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)
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.
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.
- JackWoods5 years agoQrew TraineeHey,
I tried to use this formula to get into the grandparent record as well and it doesn't seem to be working. You don't mention it in the comments but I used a formula URL field. not sure which formula field I need to create the hyperlink.
var text URL = URLRoot() & "db/" & [_DBID_IDSS] & "?a=dr&rid=" & [Related IDS];
This is the formula that I came up with from your breakdown and I seem to get an error... "A variable declaration must end with a semi-colon"
also, what do you mean by "[_DBID_Table name that you get from Advanced properties in square brackets]" I found the "Table Alias" in advanced settings and assumed that's what you're talking about but want to make sure.
------------------------------
Jack Woods
------------------------------- MarkShnier__You5 years ago
Qrew Legend
1. Yes, I meant the Table Alias.
2. Can you post your complete formula, it looks like you just posted part of it.
3. The field type should be formula Rich Text.
4. The Record ID that you will want to display is the Record ID# of the Grand Parent record. I'm not sure if what's in the field [Related IDS] is the Record ID# of the Grand Parent .. is it?
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- JackWoods5 years agoQrew Trainee1. Great thanks
2. You're right - I missed your last line there (Formula Below)
3. I change the field type
4. You're right I reference the wrong field there - I wanted the related Grandparent ID through the middle or junction table which is called Survey.
var text URL = URLRoot() & "db/" & [_DBID_IDSS] & "?a=dr&rid=" & [Survey - Related IDS]"<a href=" & $URL & ">" & $Words & "</a>"
Now the error is in bold - "a variable declaration must end in a semi colon"
------------------------------
Jack Woods
------------------------------