[✅ Solution] Clickable anchor element on calculation field from incoming related record

Here is a sample setup:

  • App A - Has a calculation field that gets an incoming related record URL from App B and shows it on the record. The @All of Record URL is a single-line text field that has the full URL of the related App B record. Here is the formula I used:

The result is:
Calc Result

  • App B - Contains a single-line text field with “Record URL” that is generated with automation.

I’m attempting to create an anchor link that, instead of showing the full URL, is a clickable hyperlink with a shorter text. Something like “Edit here”.

How can I do that in the calculation field while putting the variable value as the link?

Hi @Luis,
You can use markdown or html tags for generating urls, see image below
tape-links

Cheers,

2 Likes

Hi @comfreakph,

Thanks for the help! I was able to do what you suggested, but that only works if the URL is static.

I’m trying to get the URL value from another app (App B) single-line text field and let a calculation field (on App A) create a hyperlink to the related record. I figured out how to get the full URL of the related record, but I haven’t gotten around to putting it inside the anchor like you did with the static link.

Is that possible to do on Tape?

Hi @Luis,
in your app b you need to add a hidden single field called tape_id, each new record is added update that field with record id in automation. This ID will be used in your redirection point.
in your url this will look like

var link = All of Record URL;
var url = "https://tapeapp.com/portfolio-lic/record/";

for(var 1=0; i<link.length; i++){
   url + link[i]; // you should have id field in here...
}
 
2 Likes

Hi @comfreakph

Your code pointed me in the right direction. Thank you so much! I found the solution to have an editable text hyperlink. Here is what it looks like:

var link = @All of Record URL;
var a_in = "<a href='";
var a_out = "'>Edit here</a>";
var url = "https://tapeapp.com/porfolio-llc/(workspaces/tasks/apps/app-one//main-modal:record/";

for (var i = 0; i < link.length; i++) {

a_in + url + link[i] + ")" + a_out

}

For this code, I decided to use the full URL of the record view because I wanted to keep the original app (in this case, App One) in the background instead of redirecting to the Tape focus page (when opening the “Edit here” link from App B). It worked fantastically well!

Thanks for the help!

3 Likes

Hye Luis, trying to do what you did and I am a bit lost.

I don’t have record_url in mine.

So: I have Company App and Contacts App.
Contacts App has a field to choose a company.
In the Company app, formula field, I am trying to show the Primary Contact. It works well.

var contacts = @All of Name with nulls;
var primary = @All of Primary Contact with nulls;
var firstPrimary = ""; 
for (var i = 0; i < contacts.length; i++) { if (primary[i] == "Yes") { firstPrimary = contacts[i]; break; } } if (firstPrimary == "" && contacts.length > 0) { firstPrimary = contacts[0]; } 
firstPrimary

Now I also want to make this a link, so I can click the Contact Name displayed and go to that record. How to do it? When I hit @ I don’t see URL or Record ID’s.

The @All of Record URL is a “Record ID” field in the app you want to link. You will need to create a new calculation field in the second app (the Contacts App) with the formula @Record ID. Then you reference it on the first app calculation.

As for the URL to link to, simply copy the URL of the app you want (Contacts App) from the address bar and add the reference record ID at the end. It looks something like this:

https://tapeapp.com/your-organization/workspaces/main-app/apps/single-app?view=${@Record ID}

1 Like

That makes sense. For some reason I though Record ID will be avilable by default.

1 Like