Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I am trying to use ScriptMaster GetFileAsContainer to populate a container field with a file in the temporary path.

My script is basically:

set variable ($pathToFile = "file:" & get(temporarypath) & "test.xlsx")

export records ($pathToFile)

set field (myContainer = GetFileAsContainer( $pathToFile ))

 

The file is created, I can see it, the container field exists and is in the current context, The ScriptMaster module is registered,

    but I am getting an ERROR in the container.

Any help?

Thanks

you need to use an OS path in the second part of the script not a FileMaker one...

As John said, just change

set variable ($pathToFile = "file:" & get(temporarypath) & "test.xlsx")

to

set variable ($pathToFile = Get(TemporaryPath) & "test.xlsx")

and it should work.

Interesting that FileMaker creates the file successfully but won't retrieve it, even with the same path though...

  • Author
  • Newbies

John and rwoods, Thank you for your responses, but this had been tried with the same result.

My path is        /Macintosh HD/var/folders/90/_04p5y4n2fvc5gpr5_9bl5600000gp/T/S10.1/test1.xlsx

when I manually try just:       /var/folders/90/_04p5y4n2fvc5gpr5_9bl5600000gp/T/S10.1/test1.xlsx      it works. So the    "/Macintosh HD"    is not liked.

Is there a problem with spaces in the path?

advice appreciated. Thanks

  • Author
  • Newbies

... I tried the same thing on a server with path /sofia/.....

Again, with the full path the code fails. However when I strip the /sofia  (the computer name) from the path it is successful.

 

I tested the same thing with the Base Elements plug-in and had the same results

We are using OSX El Capitan.  Has anyone else experienced similar issues? Is this a known issue with Path names in this OS?

Thanks

Hello,

On 05/04/2016 at 2:49 PM, Yuval said:

My path is        /Macintosh HD/var/folders/90/_04p5y4n2fvc5gpr5_9bl5600000gp/T/S10.1/test1.xlsx

Your path is kind of "Finder path"… To write the absolute/canonical path the "Unix way", just prepend the disk name by "/Volumes".

/Volumes/Macintosh HD/private/var/folders/90/…etc…/file.xlsx
/Volumes/Macintosh HD/Users/userAccountName/Desktop/
/Volumes/myExternalDrive/aFolder/aSubfolder/afile

PS: no problem with spaces in a path, Scriptmaster's function arguments are all strings and are internally quoted at compile time.

  • Author
  • Newbies

Thank you clemhoff.

Indeed /Volumes in front of the path does the trick.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.