Skip to main content

Embed Formula Link or attachment

  • March 4, 2023
  • 4 replies
  • 30 views

Forum|alt.badge.img+2

the circled part is the focus…

 

let take for instance

  1. If the "display attachment field" is not empty and the "cloud hosted field" is empty, a formula to display the display attachment field and not the cloud link field
  2. If the "display attachment field" is not empty and the "cloud hosted field" is not empty, a formula to display one of the field

4 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Try something like:

IF( AND({display attachment field}, {cloud hosted field} = ""), {display attachment field}, IF( AND({display attachment field}, {cloud hosted field}), {cloud hosted field} ) )

I don't know how you're determining which field to display if both fields aren't empty so I just picked the cloud hosted field.  I would also recommend you check out the formula field reference


Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • 6 replies
  • March 4, 2023

Try something like:

IF( AND({display attachment field}, {cloud hosted field} = ""), {display attachment field}, IF( AND({display attachment field}, {cloud hosted field}), {cloud hosted field} ) )

I don't know how you're determining which field to display if both fields aren't empty so I just picked the cloud hosted field.  I would also recommend you check out the formula field reference


That's actually true, the script for displaying one of them if both aren't empty will be needed. 


Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • 6 replies
  • March 4, 2023

Try something like:

IF( AND({display attachment field}, {cloud hosted field} = ""), {display attachment field}, IF( AND({display attachment field}, {cloud hosted field}), {cloud hosted field} ) )

I don't know how you're determining which field to display if both fields aren't empty so I just picked the cloud hosted field.  I would also recommend you check out the formula field reference


Have checked the formula field reference didn't see much that could be added to the script formula though 


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • March 5, 2023

Formula fields cannot display attachments. At best a formula field can display the file name and url of an attachment field. However, even though the url for the attachment might work for now, Airtable has stated that the URLs for attachments that are displayed in formula fields will become invalid. I would not count on them continuing to work.