Skip to main content
Solved

How to check if attachement field is empty or not


Hi everybody,

I’d like to check if an attachement field is empty or not. Someone knows how to do this ?

Tanks a lot.

Fred

Best answer by Jeremy_Oglesby

Ah, no… sorry, I know what it is — it’s the smart quotes. They got both of us.

Try again - copy-paste this:

IF(Rapport, 'OUI', 'NON')

… I promise you it will work this time

View original
This topic has been closed for replies.

9 replies

JonathanBowen
Forum|alt.badge.img+18

Hi @LEROY_Frederic - try this:

IF(Attachments, 'There are attachments for this record', 'No attachments for this record')

JB


Hi @LEROY_Frederic - try this:

IF(Attachments, 'There are attachments for this record', 'No attachments for this record')

JB


Hi Jonathan,

Thanks for the answer, but…

Don’t know why, didn’t work with my table :
Rapport is my attachement field
in my test field the formula :
if (Rapport,‘OUI’,‘NON’)

airtable says in red : Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.

an idea about ?


Forum|alt.badge.img+18

Hi Jonathan,

Thanks for the answer, but…

Don’t know why, didn’t work with my table :
Rapport is my attachement field
in my test field the formula :
if (Rapport,‘OUI’,‘NON’)

airtable says in red : Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.

an idea about ?


Do you have a space between the word “if” and the opening parenthesis?

Try pasting this formula in:

IF(Rapport, ‘OUI’, ‘NON’)

Sorry for the late answer…
Same message when pasting.
I have an idea, using airtable APP on Macintosh or Web App


Forum|alt.badge.img+18

Ah, no… sorry, I know what it is — it’s the smart quotes. They got both of us.

Try again - copy-paste this:

IF(Rapport, 'OUI', 'NON')

… I promise you it will work this time


Ah, no… sorry, I know what it is — it’s the smart quotes. They got both of us.

Try again - copy-paste this:

IF(Rapport, 'OUI', 'NON')

… I promise you it will work this time


Oh yes!!! Thank you very much!!


Heather_Brown
Forum|alt.badge.img+2

Hi All,

This formula works fine applied to a checkbox field

IF({Print copy sent}=1,“ :green_book: ”)

but when I try to apply to an attachment field, it’s not working

IF({Attachments}=1,“ :pushpin: ”)

I tried with and without curly brackets and edited quotes, checked spaces, etc. Any idea what I might be doing wrong?

Thank you!
Heather


JonathanBowen
Forum|alt.badge.img+18

Hi All,

This formula works fine applied to a checkbox field

IF({Print copy sent}=1,“ :green_book: ”)

but when I try to apply to an attachment field, it’s not working

IF({Attachments}=1,“ :pushpin: ”)

I tried with and without curly brackets and edited quotes, checked spaces, etc. Any idea what I might be doing wrong?

Thank you!
Heather


Hi @Heather_Brown - “=1” works OK with a checkbox field but not with an attachment field. For an attachment, you need to do:

IF({Attachments},'📌')

Side note: this also works with a checkbox field, so, something like:

IF({Checkbox}, 'checked', 'not checked')


Heather_Brown
Forum|alt.badge.img+2

Marvelous! Thank you, Jonathan!