Jump to content
Server Maintenance This Week. ×

Default Script Parameter


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

Recommended Posts

Hi Comment,

I find myself more and more using ScriptParameters.

Some of the script Parameters rely heavily on specific variables being set for the script to work.

If the script itself had a default / auto-entry script parameter when i create a button or add a subscript the default script parameter could automatically be added. Then i can modify it to fit or leave it when required.

This would allow me to make a Let ( [ var1=""; var2=""; var3=""] ; result ) template for these scripts rather than having to find another button or subscript instance.

Would just make adding a dynamic script quicker.

best

Stuart

Link to comment
Share on other sites

I think what Stuart means is being able to find what parameter is needed for a script without looking for a layout button or another previous call of that script.

I do this by adding a comment™ in the script with a sample parameter. Since FileMaker 9 and the fact that you can open multiple script windows at the same time, it is a snap to open the script (or subscript) you want to perform, open the comment line, copy its content, and paste it in the parameter calculation.

More, all my script parameters are structured in an xml-like way, making it easy to declare named variables with a single custom function.

Edited by Guest
Link to comment
Share on other sites

I agree, it's a good standard practice to include a comment at the top of every script with expected parameters. Also good to comment the last modified date, context, etc.

Interesting idea though, Stuart. It would be really cool if I could define a script's parameters within the script, and then when I call the script, select the parameters from a popup list -- but still be able to override if needed.

Link to comment
Share on other sites

This topic is 5653 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.