Jump to content

Frustrated noob...ChooseFolder


jarmen
 Share

This topic is 4362 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I recently switched workflow to Mac and found my Mooplug doesn't work. I like the premise of Scriptmaster but find myself with training wheels. Here's my example. I previously used Moo to assign a folder to a variable using the following script:

Set Variable [$$jpegPath; Value:Moo_Diaglog_Folder]

Set Field [iMAGES::JPEGPATH; $$jpegpath]

Effectively allowing the user to choose a default folder where the images where found. From what I can tell this should be easier in Scriptmaster but I can't get it work without a prompt for a field name. When I try Set Variable [$$jpegPath; Value:ChooseFolder(prompt; startingPath) FM prompts me for the specified table. I realize I'm at 101 level with this but I just don't get it. Can anyone point me in the right direction?

Thanks

Link to comment
Share on other sites

"prompt" and "startingPath" are parameters for the function, which you need to fill in with the values for those parameters. You have left the parameter names in rather than filling them in with either values, or fields, or removing them, so FileMaker thinks that you're trying to reference a field named "prompt" and "startingPath" in your database.

From the module notes in ScriptMaster.fp7:

This prompts the user to select a folder on their hard drive. You can optionally specify a startingPath if you want the user to start in a certain location, and you can specify an optional 'prompt' message which will be used as the dialog title. If the user cancels, an empty result is returned.

You can either skip the parameters and remove them, or fill them in with the values that you want to use. The values can be either hard-coded or pulled in from a field or a variable, or another calculation.

you might use:

ChooseFolder

or

ChooseFolder ("Select a field")

or

ChooseFolder (""; get(desktoppath))

or

ChooseFolder ("myTable::myMessageField; myTable::startingPathField)

All of our plugin functions work just like the other plugin functions you can use from the function list in FileMaker, and you can treat them, use them, and calculate them the same way.

Link to comment
Share on other sites

This topic is 4362 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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