Skip to main content

How to print linkable URLs?

  • May 23, 2020
  • 11 replies
  • 77 views

Forum|alt.badge.img+4

When I print a view that contains links, they are not clickable in the PDF result. How to achieve that?

11 replies

Forum|alt.badge.img+20
  • Inspiring
  • 614 replies
  • May 23, 2020

Hi @Kamil_Lelonek

I managed to find a thread of posts that might help.

Hope this might help.

Mary Kay

If this does help, can you type SOLVED in the subject line?


Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • 7 replies
  • May 23, 2020

Oh, the problem is I’m using the LOOKUP type to display such links, and they are not clickable then :confused:


Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • May 23, 2020

Oh, the problem is I’m using the LOOKUP type to display such links, and they are not clickable then :confused:


In the article that @M_k linked, it was mentioned that formula-generated URLs would also create clickable links in PDFs, so I thought it might work to pull the URL from the lookup field via formula. However, something has changed since then, and this is no longer the case. I ran several tests, and could only get a live link using an actual URL field.


Forum|alt.badge.img+20
  • Inspiring
  • 614 replies
  • May 23, 2020

In the article that @M_k linked, it was mentioned that formula-generated URLs would also create clickable links in PDFs, so I thought it might work to pull the URL from the lookup field via formula. However, something has changed since then, and this is no longer the case. I ran several tests, and could only get a live link using an actual URL field.


Hi @Justin_Barrett

Thank you.

I sent you a PM last week. Did you get it?

Mary


Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • May 23, 2020

Hi @Justin_Barrett

Thank you.

I sent you a PM last week. Did you get it?

Mary


@M_k No, I don’t see any PMs from you since our last conversation wrapped in December.


Forum|alt.badge.img+20
  • Inspiring
  • 614 replies
  • May 23, 2020

@M_k No, I don’t see any PMs from you since our last conversation wrapped in December.


Hi @Justin_Barrett

I just sent you a PM. Hopefully you got it.

Mary


Forum|alt.badge.img+19
  • Inspiring
  • 3263 replies
  • May 24, 2020

In the article that @M_k linked, it was mentioned that formula-generated URLs would also create clickable links in PDFs, so I thought it might work to pull the URL from the lookup field via formula. However, something has changed since then, and this is no longer the case. I ran several tests, and could only get a live link using an actual URL field.


It’s a shame that Airtable doesn’t support fields that also have formulas as an attribute. :slightly_smiling_face:


Forum|alt.badge.img+19
  • Inspiring
  • 3263 replies
  • May 24, 2020

Yeah, this is a problem. Two basic approaches -

  1. Create an external API process that either builds your PDF from scratch (Google Apps Script can do this), or pre-populates (and sustains this population) of link fields that are not actual formula fields.
  2. Create a script block that copies the formula links into a real field.

Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • 7 replies
  • May 25, 2020

What I did was:

let table = base.getTable('Plany');
let view = table.getView('Grid view');
let result = await view.selectRecordsAsync();

for (let record of result.records) {
    let link = record.getCellValue('Link')[0];
    await table.updateRecordAsync(record, {
        'URL': link,
    });
}

Let me know whether that’s correct.


Forum|alt.badge.img+19
  • Inspiring
  • 3263 replies
  • May 25, 2020

What I did was:

let table = base.getTable('Plany');
let view = table.getView('Grid view');
let result = await view.selectRecordsAsync();

for (let record of result.records) {
    let link = record.getCellValue('Link')[0];
    await table.updateRecordAsync(record, {
        'URL': link,
    });
}

Let me know whether that’s correct.


Only you can decide if it’s correct because we cannot see your table or the data types of the fields. Does it work when you run it?


Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • 7 replies
  • May 25, 2020

Yes yes, it works correctly. Too bad we cannot have it automatically.