Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scripting

What Is Scripting?

There are two types of field within PhixFlow:

  • Static fields which are configured with a static value e.g. the name field for a Stream.
  • Dynamic fields which can be configured with an expression/script to provide different values depending on the context in which they are evaluated.

Much of PhixFlow's dynamic behaviour is created by the ability to configure simple expressions or more complex scripts within the dynamic fields. This chapter covers the details of how to write your own expressions, from simple assignments to complex looping operations. The scripting features are covered on the following pages:

Scripting BasicsBasic operations (+, -, *, /), "$" variables, variable types, assignment statements, object types and commenting scripts.
PhixFlow VariablesHow variables are used in PhixFlow.
PhixFlow Internal VariablesA List of values that PhixFlow defines in the course of processing that are available for use in building models.
Conditional StatementsHow to conditionally control the flow of your script using the if() and switch() functions.
Looping StatementsHow to execute blocks of script a number of times.
Arrays and Record SetsHandling sets of data.
Filters and LookupsHow to construct filters and perform dynamic lookups on Pipes.
MacrosEncapsulate script so that it can be used from several different dynamic fields
Scripting StyleA summary of the recommend scripting styles e.g. how to lay out an if clause and how best to name variables etc.

See Also