4 Replies Latest reply on Jan 1, 2016 1:06 PM by RichardStuart_2

    Extract filename from embedded in a container field?

    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.

       

      Cheers!

      Rich

       

      -------------------------------------------------------------------------------------------

       

       

      Let

      (

      [

       

      // 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)

      )