The MetaSQL parameter editor lets you choose whether or not a MetaSQL query will use a particular parameter and what the value of that parameter should be. The value can be constrained to legal values by choosing a data type for it.
The MetaSQL parameter editor is usually embedded in another window. Examples include the Export Data window and xTuple Connect's Review EDI Before Sending window. This is an example of what it looks like:
This example shows a single parameter called cust_number
. The value of this parameter has not been set yet and it is not active, so it will not be used when a MetaSQL query is run.
If you click the
button you can set the value of this parameter and whether it is active or not. You will see the following screen:When you open the Parameter Properties window, you are presented with the following options:
Choose the data type of this parameter. Options include the following:
This lets you enter free-form text and is the most common type used.
This lets you choose either True or False.
This restricts input to a valid integer value, reducing the potential for errors. This should be used when entering internal id numbers.
This restricts input to valid numerical values, reducing the potential for errors. This should be used when entering monetary values, weights, and percentages.
This allows entering a list of values. It is not used very often.
Select String as the type if you need to enter a date. Any text value that the PostgreSQL database server can convert to a valid date can be entered here.
This is the name of the MetaSQL parameter as it appears in the MetaSQL query. If you are using the parameter editor when executing a query set or MetaSQL query from the xTuple ERP application, you should not change the name.
Check this box to pass this parameter and its value to the MetaSQL query.
Type or select the value you want to set for this parameter. The appearance of this field will change based on the type.