July 3, 201015 yr This is driving me nuts. I've used it in so many solutions before... Set Variable [$FilePath; Get(DesktopPath) & GetAsText(Container)] Export Field Contents [Container; $FilePath] I checked the variable, and here's what it contains: /Macintosh HD/Users/michael/Desktop/About Stacks.pdf, yet the script returns "Container Fields cannot be exported." Does anyone have experience with this? Previous posts I found on the subject were not helpful...
July 3, 201015 yr It seems to me that getastext (container) would never work (as that gives you the path to a referenced container). If you want to export a container, it must be embedded first, not referenced. Then, $FilePath; Get (Desktoppath) & "filename.ext" will work. How you define your filename is up to you. Edited July 3, 201015 yr by Guest
July 3, 201015 yr Author Based on your recommendation, I've tried the following approaches: - Calc field ("Cont_text", result as text) pointing to the container field used in file path variable, such as: Set Variable [$FilePath; Get(DesktopPath) & Cont_text)] Export Field Contents [Container; $FilePath] - Creating a variable first ("$filename) with the file name retrieved from the container field, such as: Set Variable [$FileName; Container] Set Variable [$FilePath; Get(DesktopPath) & $FileName] Export Field Contents [Container; $FilePath] Neither of which worked. Same result, container can't be exported. Am I interpreting your suggestion correctly? Thanks!! Edited July 3, 201015 yr by Guest
July 6, 201015 yr Author Sometimes I'm BLIND... I was pointing to a container field in an other table. Of course that didn't work. A more refined error message would be nice though, FileMaker. :-) Sorry to have bothered all of you about this!
Create an account or sign in to comment