Understanding Script Controls
Each script control provides parameters to master script functions (Master Script Function List) within a framework of conditional (if-then-else) expressions. A single Standard Choice can contain multiple script controls. The master script evaluates the script controls in the order that the Standard Choice numbering specifies.
Script controls use the caret (^) symbol to delimit the if clause (predicate) from the then clause (consequent) and the else clause (alternative) in a single conditional expression. Civic Platform interprets the first clause as the if clause, the second clause as the then clause, and the third (optional) clause as the else clause.
Each clause in a script control calls a master script function and provides parameter values required by that function. The variables associated with the scriptable event () determine the scope of possible variables that the script control provides to the master script function.
Enclose master script function parameters in parenthesis. Use a comma to delimit master script function parameters. Enclose string parameters in double straight quotes. JavaScript Primer provides additional Javascript syntax elements you can use in script controls.
Example Use Case
appMatch
for
example, provides a return value, in this case true or false, to
determine whether to perform the function in the then clause.Example Use Case
Script Control Structure (if/then/else) says, “If Acres Disturbed is less than 5 then assess but do not invoice the SMALLACRE fee, else assess but do not invoice the BIGACRE fee.”