Stuart Taylor Posted November 4, 2008 Posted November 4, 2008 I would like to enter a default "Optional Script Parameter" to my scripts, so that i do not have to search for another instance of the script parameter every time i implement it especially those that have a large number of variables.
Stuart Taylor Posted November 4, 2008 Author Posted November 4, 2008 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
fabriceN Posted November 4, 2008 Posted November 4, 2008 (edited) 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 November 4, 2008 by Guest
Stuart Taylor Posted November 4, 2008 Author Posted November 4, 2008 (edited) Interesting point i am 8.5 Although many of my dynamic scripts are not nested. (not subscripts but buttons). Edited November 4, 2008 by Guest
Fitch Posted November 5, 2008 Posted November 5, 2008 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.
Recommended Posts
This topic is 5861 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 accountSign in
Already have an account? Sign in here.
Sign In Now