Brian Dunning's FileMaker Custom Functions

FileNameFromContainer ( containerField )

Get the file name of a file in a container field.

  Average rating: 4.4 (25 votes) Log in to vote

Dan Shockley   Dan Shockley - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
FileNameFromContainer ( MemberPhoto )
  Sample output:
"SusanHill.jpg"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Extracts the file name of a file inserted into a container field, including the extension.

 

Comments

unix   unix, Japan
May 21, 2015
As of FM13 there is
GetContainerAttribute(sourceField;"filename")
 
Vyke   Vyke, Washington DC
Jul 6, 2015
Or...... you could just use:

GetAsText(<container field>)
 
Dan Shockley   Dan Shockley
Jul 6, 2015
True about FileMaker 13, for those using it everywhere.
As for just using GetAsText, read the function: there are situations where the GetAsText has a lot more than the name, even of the first line. That is too simple a solution and will fail in those situations.
 
David   David
Mar 22, 2017
You could also use GetContainerAttribute(Container;"Filename")
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: