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.

Passing Multiple Script Parameters

Featured Replies

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.

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.

  • Author

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?

Any script step that performs a calculation will do.

  • Author

What would you use?

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.

  • Author

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.