Script Pass Multiple Parameters

Discussion created by grimofdoom on Jul 29, 2017
Latest reply on Jul 30, 2017 by bigtom

I can pass single values through the parameter field when pushing a script to run, but what is the best/easiest/functioning way of passing multiple parameters to my scripts? I have seen multiple ways of doing them online, but they are fairly old (2009 even) and I cannot say the methods seam any good - Such as passing a list. Easy, but requires blanks here and there for anything the programmer does not need to pass because order matters. Then I have seen several for assigning variables, but the work is in large amounts with concatenation.


What I currently need this for is a script that I want to run as a function (basic functionality that runs differently depending on the parameter passed). For example, my solution runs in window based for everything (made for multiple monitor and viewing multiple things at one- a must), so I made a script (and 'custom function') for checking if a window is open and then opening or selecting that window (reducing a repetitive kinda lengthy calculation and 5+ line script to a single reusable script).


Filemaker should really incorporate a 'Custom Function' usage for scripts (specifying exactly what parameters are required and which ones are not, their data types, which ones can be endless lists). Seams like a no-brainer that it should have been there in the first place.