Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have been researching many different techniques for passing multiple script parameters. Most if not all include using a custom function. Unfortunately I have had difficulty wrapping my head around how to implement custom functions so thus far I have avoided them. I know that all it will take is the right approach to make it all click for me but thus far I feel lost. The documentation for the techniques I have found just seem to be lacking in some of the basic instructions that perhaps the authors are assuming the reader is already familiar with. Unfortunately I am not.

So as my first attempt at using a custom function I would like to impliment a way to pass multiple script parameters directly to globals. I found a couple versions of this technique but again I just couldn't wrap my head around them.

My goal is to be able to add script parameters that predefine script variables ( both local and global ) such as:

- In the script parameter dialogue -

$action = export

$layout = progress

$$option = detail

I would like to then be able to use these named variables directly in the script called. I have seen the use of Let() in doing this but I am struggling to understand Let() as well.

I would really appreciate some help in implimenting and understanding such a technique.

Thank you to anyone who cares to chime in.

Posted

Here's one of the best (IMHO) techniques - and it doesn't require a custom function:

http://fmforums.com/forum/showtopic.php?tid/172514/post/187782/#187782

BTW, in most cases the script can load the values into variables directly - without needing to "unpack" the script parameter.

Posted

Thanks Comment. I had seen that thread but on rereading it I found the link provided by Søren ( http://tokerud.typepad.com/filemaker/2005/11/filemaker_8_usi.html )and was delighted to see how simple this approach is.

It seems the drawback is that it only works for setting global variables. Then I saw your sample file which appears to solve that problem by using Evaluate ( Get (ScriptParameter) ). In the case of your example Evaluate ( Get (ScriptParameter) ) is within the custom message dialogue box. What I don't see is how to use it without the dialogue box. In other words I don't see Evaluate () as a script step. Don't quite have a grip yet. Could you please help clearify this for me?

Posted

Set Variable[] seems the most appropriate. But really, even Pause Script[] could be used, or If[] or ... The variables are created during the calculation, and the result can be anything.

Posted (edited)

You are the man as always!! Thank you :

Guess custom functions will wait for another time since I didn't need one here.

Edited by Guest

This topic is 5218 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
×
×
  • Create New...

Important Information

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