Oh, and script needs to run on MAC and PC....
Looks like you are going to need to learn more about file paths.
There's a function that will give you the precise file path to the current FileMaker file's location. with a bit of "surgery", you can tack on one more file folder name to that path to get to Site Survey. Let's start with that as this is the simplest option of those that you've listed.
Set Variable [$Path ; Value:
Let ( [ fp = get ( filepath ) ;
ln = length ( fp ) ] ;
left ( fp ; position ( fp ; "/" ; ln ; -1 ) )
) & "Site Survey/Lables.xlsx" ]
Export Records [no dialog ; $Path ;...
you type the name of your variable without quotes directly into the dialog for specifying the file.
If you really want to "hunt backwards" to find a particular folder that might be in more than one location, you'd need to get the assistance of either a system script or a file plug in in order to find this folder.
Yep-- learning more for sure.
So I had an idea that i would be using the "Get(filepath)" so that makes me feel good
Since you posted, I edited my post. I had no issue (after removing the / I left in) to get it into the subfolder.
I'll work on going "backwards," your variable makes I think enough sense to get close. I'll report back as soon as I get it... or give up
As always... I appreciate your help!
To just get your first try to work, get rid of the initial /
So, file:Site Survey/Labels.xlsx
philmodjunk is almost correct, except that Get ( FilePath ) gives a leading 'file:', and you need to change that to either 'filemac:' or 'filewin:'; that's easy enough to do in the Let statement, using Get ( SystemPlatform ).
I always prefer to calculate the path I'm going to export to as a variable (as Phil has done). While I prefer to use a complete path (actually, I have the free BaseElements plugin, which allows the user to choose a folder), the relative path should work OK for you.
You do not need to change to filewin or filemac. file: works just fine and is cross platform compatible so it saves you the trouble of checking for platforms before assigning filewin: or filemac:
You're right, it works fine. And here I've for years been writing in that extra bit to comply with the examples given in the Specify Output File dialog. Learn something new every day, thanks.