Collapse AllExpand All

12.6.2. MetaSQL Parameter Editor

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:

Review EDI before sending

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 EDIT button you can set the value of this parameter and whether it is active or not. You will see the following screen:

Parameter Properties

When you open the Parameter Properties window, you are presented with the following options:

Type

Choose the data type of this parameter. Options include the following:

String

This lets you enter free-form text and is the most common type used.

Bool

This lets you choose either True or False.

Int

This restricts input to a valid integer value, reducing the potential for errors. This should be used when entering internal id numbers.

Double

This restricts input to valid numerical values, reducing the potential for errors. This should be used when entering monetary values, weights, and percentages.

List

This allows entering a list of values. It is not used very often.

Tip

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.

Name

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.

Active

Check this box to pass this parameter and its value to the MetaSQL query.

Value

Type or select the value you want to set for this parameter. The appearance of this field will change based on the type.