GetParameter ( subParameter )
Returns the specified “sub-parameter” of a given script parameter.
Average rating: 3.6 (58 votes) Log in to vote
Jeff Drake - Show more from this author
"customerName = " & Quote("Jim Smith") & "; " &
"lineItemID = 15690"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Most methods of defining multiple script parameters require that the developer place the “sub-parameters” in a specific order and then call them by number. By using the Evaluate and Let functions, GetParameter( ) allows you to give each sub-parameter an intuitive name, then call it by name, regardless of where it falls in the full Script Parameter.
Not only is the order of the sub-parameters irrelevant, but so is the number of sub-parameters. If OrderID is the first of five subs in one Script Parameter and the eighth of fifteen in another, the function will work just as well.
Caveat: any sub-parameter that can conceivably be empty must be enclosed in a Quote( ) function. Otherwise, the Let( ) function within GetParameter( ) will fail.
Update: added error trapping for nonexistent subparameters.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.