If you are using FM12 you can use the external open storage option to specify the storage location.
If this is a served solution, selecting Open storage is contrary to FMI's engineers' recommendations. They also state that the contents of the served external containers should be managed by FileMaker rather than being Open, and that entire area of storage should not be accessed directly on the server by users.
I believe there are some plugins which allow folder manipulation on the client, and that might be the way to go to let each user to have their own folder locally, generated from the served file's data.
1 of 1 people found this helpful
The free ScriptMaster plug-in from 360Works can create a folder among other things...
CreateFolder This takes an operating system path as a parameter (for example, /Users/Shared/newFolder or C:\Documents and Settings\MyAccount\newFolder) and creates that folder. It returns a 1 if the folder was created, 0 if it already exists, and an error if the folder does not exist and could not be created. It will create nested subdirectories, so if /Users/Shared existed and you use /Users/Shared/a/b/c as the path, it will create folders a, b, and c.
You can use the built in FileMaker function Get(DesktopPath) also.
and, it's very good.
If on a Mac, you can do it with Perform Applescript and this calculation:
"do shell script \"mkdir " &
Let ( [
dt = Get ( DesktopPath );
sd = Get(SystemDrive) ;
folder=Get(AccountName) & "_SubPlans";
thepath = Substitute ( dt ; sd ; "" ) ;
thewholething="/" & thepath & folder & "\""
I'm assuming that get(accountname) is the teacher surname (Duffy) or you could use an existing field if you have one with the teacher surname. The only problem is that it doesn't work with spaces in the folder or path name. Perhaps someone more clever has a better way of escaping the spaces.
These are great ideas.
I actually haven't delved too much into the world of plugins yet. I should start for the hosted solution. I don't know if that Scriptmaster plugin can be installed in a hosted solution to give everyone access to the capabilities.
Josh. I'll take a look at the post you linked to. That seems interesting as well.
And I'll take a look at the Goya plugin on this.
on 2013-07-13 5:01 s wrote
The only problem is that it doesn't work with spaces in the folder or path name.
a little simpler, and won't fail on user folders that have spaces in the name;
but will still fail if there's a space in the result of Get(AccountName); note
"-p" keeps mkdir from raising an error if the directory already exists
Let([ folder_to_create = Get(AccountName) & "_SubPlans"; shell_script = "mkdir -p ~/Desktop/" & folder_to_create ]; "do shell script " & Quote(shell_script) )
or completely space-safe:
"set hfs_desktop to (path to desktop folder) as string¶ set hfs_subfolder to hfs_desktop & \"" & Get(AccountName) & "_SubPlans\"¶ set posix_subfolder to quoted form of posix path of hfs_subfolder¶ do shell script \"mkdir -p \" & posix_subfolder"
ScriptMaster and BaseElements plugins are free, which is great and I use both of them. Lately I have been makingmore use of the MonkeyBread Software plugin due to its depth (1100+ functions), but it is not free. All of these plugins and quite a few others will do what you need.
What you should do is on the startup script, you need to check and see if the client machine has the plugin you want to use. If not, then you have the Install Plugin script step install the plugin so that it can be used by that client machine. Do it all in the startup script so that the end user doesn't even know it is being installed and it happens automatically. Then you will have that functionality available to all of your scripts.
I really need to sit down and explore working with Plugins. To this point I haven't really done much with them. I'm sure I'll find that using plug ins is equivalent to using the LET statement: How did I ever program without it?
Taylor, where are the plugins stored then: on the server or in the file that i'm developing on (the file that everyone opens)? Do you know of good resources to help me understand plugins better?
You need to create a table in your solution for plugins that has the plugin name, version, and a container field that you store the plugin. The startup script step can verify if the plugin is not installed or if the one installed is an old version and then if appropriate, it can use the Install Plugin script step to save the plugin from the container field down into the FileMaker's Extensions folder of the client machine so that the client can begin using the plugin. Pretty nifty and happens all automatically so that end users don't have to know anything about plugins. For them, it just works!
There are some purists who do anything to avoid using plugins and do so means your solution is the most portable. There are always issues if future versions of FileMaker won't be compatible with a plugin or if a plugin developer goes belly up and quits supporting the plugin. However, plugins bring lots of additional functionality not natively in filemaker from manipulation to credit card processing to image manipulation to hashing and ciphers and much more. So it really opens up some cool possiblilities.
One more thing, on the plugin table, you'll need two entries for each plugin, a Mac version and a Windows version and a field identifying which is which.