AnsweredAssumed Answered

Extract filename from embedded in a container field?

Question asked by RichardStuart_2 on Dec 29, 2015
Latest reply on Jan 1, 2016 by RichardStuart_2

HNY, everybody!


Quick question: I know you can extract a filename from a container field if it's stored as a reference (using the calculation below), but what if it's embedded? I want to create a script so that users can export an embedded file to the desktop, but I don't want to have them have to manually change the filename and add the filetype's extension, too, once it's there.












// Transform the contents of a container field named Images into text

ImageRef = GetAsText ( Images);

FileName = Position ( ImageRef; "/"; 1; PatternCount ( ImageRef; "/"))



Middle ( ImageRef; FileName + 1; Length ( ImageRef) - FileName)