Is there a file attached? Display in a table.
Hi,
Is there a way of displaying in a table whether or not there is a file attached to particular records in a yes/no format. I suspect there is (but don't know how to do it) because in the form view of a record on the file tab, the little file icon is black if there is a file attached. It would then be feasible to filter records with a file attached or no file attached, which is what I want to do. Thanks for any assistance you can give.
10 replies
-
Hi,
Hi,
You could use the followin formula in a formula field in order to display, if the data record has an attachment:
if concat(files(this)) then
"There are attachments"
else
"No attachments"
end
Best, Jörg
-
Brilliant! Thanks Jörg, that works a treat.
Regards
Keith.
-
When is “no attachment” i want be red color. How can do?
-
Use styled
styled(text, colour, icon) - creates styled text elements. The icon is placed to the left of the text. Use "" for none, and the colour is the objects background
| styled("Attention", "red", "warn")so something like this:
if concat(files(this)) then
"There are attachments"
else
styled("No attachments","red","")
end -
Brilliant! Thanks Jörg, that works a treat.
Regards
Keith.
-
Thanks blackie.
Keith
-
your welcome, but for me dont work with styled
my formula is:
if concat(files(this)) then
"Attach"
else
styled("No attach","red","")
end
show me this massege: Return type mismach for then and else expressions,:string,styled at line 5, column 3
-
From the error message it looks like you need to add styled to the then part.
if concat(files(this)) then
styled("Attach","","")
else
styled("No attach","red","")
end
-
yes,worked and thank you.
-
Hi,
I'm trying to use this code but, since I have other files as image fields in my records, concat(files(this)) is always true.
Is there any way to check if there's a file in the attachment tab independently of the other image fieds?
Thank you
Content aside
- 4 yrs agoLast active
- 10Replies
- 2904Views