Facing problem in exporting container field content
I have a container field for storing document files which is stored externally (open storage)
This file may be any file .pdf, .doc, .docx, .xls, .xlsx etc.
Now for opening container file, I am exporting it to temporary path. I am setting variable as:
$PATH = Get(TemporaryPath) & "/PO-" & Offer Detail::Customer Name
Export field contents ($PATH) (Automatic open file)
Now my question is every time the extension may be different and I have to add that extension at the end of my variable. For e.g. $PATH = Get(TemporaryPath) & "/PO-" & Offer Detail::Customer Name & ".pdf"
Is there any solution so that I automatically get extension of container field?
Take a look at this thread: Exploring the use of a $Path Variable in Scripts
There's a file you can download from this thread that has a calculation that can extract the complete file name--including the file extension. This calculation has been designed to work with nearly all storage and insertion options--including external storage.