Combining Text Column & URL Column to create Text with Hyperlink inline

Hi! I have the following set up:

Column A: Name
Column B: Text
Column C: URL

I would like to combine these into a new column to read like so:

“Text (with hyperlink) - Name”

I should note that the URL is to an external page, and not an internal reference to another base / table / etc. Any idea how to help with this? Thanks!

Welcome to the community, @Steve_Marks1! :smiley: That kind of hyperlink can’t be created via formula at this time. You can manually create something like that in a long text field with rich text enabled, but formulas can’t currently create rich text. I haven’t yet tried creating such rich hyperlinks via scripts, though, but I might play around a bit. If I do, I’ll let you know how it turns out.

1 Like

Hi @Justin_Barrett . Do you know if this can be achieved through Integromat?

Thanks for taking a look at my question!

Possibly. I ran a really brief test a while ago (shortly after rich text was added to Airtable) creating rich text via Integromat, and it worked. You just need to follow the markdown syntax as outlined in the docs. My gut says that if it works from Integromat, it would probably also work internally using a script (either the Scripting block, or an automation).

Just ran a quick test with the scripting block, and it works. Here’s my test script:

let tb = base.getTable("URL Test");
let query = await tb.selectRecordsAsync();
for (let record of query.records) {
    let url = record.getCellValue("URL");
    let name = record.name;
    let text = record.getCellValue("Text");
    if(url) {
        tb.updateRecordAsync(record, {"Rich": `[${text}](${url}) - ${name}`})
    }
}

This will only make the hyperlink when there’s a URL in the {URL} field. With a little more twiddling, this could be modified to work via Airtable’s automation system, to automatically create the hyperlink as the record is being edited.

2 Likes

Thank you for this! This is great!

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.