Forum Discussion
BrandonDrake
6 years agoQrew Cadet
Hi Mike,
The way that you can accomplish this is to create a formula Richt Text field. You would create an if statement where the condition is what determines whether the [Related Parts] will be shown or [Related Pieces]. Then, as far as I know, you would need to create an anchor tag to create the link. The following is an example:
var text displayValue = if([Condition] = true, [Related Parts Proxy], [Related Pieces Proxy]);
var number recordID = if([Same Condition as above] = true, [Related Parts], [Related Pieces]);
var text tableID = if([Same Condition as above] = true, [_DBID_Parts], [_DBID_Pieces]);
var text URL = URLRoot() & "db/" & $tableID & "?a=dr&rid=" & $recordID;
"<a href='" & $URL & "'>" & $displayValue & "</a>"
------------------------------
Brandon Drake
JHI Group
Monroeville OH
------------------------------
The way that you can accomplish this is to create a formula Richt Text field. You would create an if statement where the condition is what determines whether the [Related Parts] will be shown or [Related Pieces]. Then, as far as I know, you would need to create an anchor tag to create the link. The following is an example:
var text displayValue = if([Condition] = true, [Related Parts Proxy], [Related Pieces Proxy]);
var number recordID = if([Same Condition as above] = true, [Related Parts], [Related Pieces]);
var text tableID = if([Same Condition as above] = true, [_DBID_Parts], [_DBID_Pieces]);
var text URL = URLRoot() & "db/" & $tableID & "?a=dr&rid=" & $recordID;
"<a href='" & $URL & "'>" & $displayValue & "</a>"
------------------------------
Brandon Drake
JHI Group
Monroeville OH
------------------------------
MichaelTamoush
6 years agoQrew Captain
Thanks Brandon.
One of my related fields uses the record ID for key, and is numeric. The other uses a related field that is not the record ID, and is a Unique key field that is text. How would I alter the above code to account for that?
------------------------------
Mike Tamoush
------------------------------
One of my related fields uses the record ID for key, and is numeric. The other uses a related field that is not the record ID, and is a Unique key field that is text. How would I alter the above code to account for that?
------------------------------
Mike Tamoush
------------------------------
- MarkShnier__You6 years ago
Qrew Legend
Mike
When specifying a record in a URL you can specify the rid or the key
&rid=
&key=
so just replace "&rid=" with "&key="
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- MichaelTamoush6 years agoQrew CaptainGotcha - I didn't actually even make it that far, the second line creates var number except one of my related fields is non numeric. I get an error says it is expecting numeric but receiving text
------------------------------
Mike Tamoush
------------------------------- MarkShnier__You6 years ago
Qrew Legend
.. not sure if that is a question, but if so we would need to see the formula and the error message
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------