Search…
Resources
Related Links
file
To return a specific file based on the file name from a given record
With this function, you can address a specific file attachment of a record, e.g. to display it in an image field or to send it as an attachment of an automatically generated e-mail.

Syntax

file(nid, string)

Return

file

Examples

file(record, fileName) To return a specific file based on the file name from a given record.
file(this,”INV-2021_13874.pdf”) To return the file “RE-2021_13874.pdf” from the current record.

See also

file, which returns all attachments of a record as an array.
importFile, which imports a file from an URL and saves it as an attachment of a record.
Last modified 2mo ago
Export as PDF
Copy link