Feature Rich
Rapid Application Development
Helping you or your customers
Manage their Business

All Commands All Other
Commands

QUERY_WIZ

QUERY_WIZ is an abbreviation of QUERY WIZard


This command is mainly designed for use when creating queries based on user input

For that reason it is best suited to reports where you ask the user a question, e.g. a date range, and need to include the answers in the query to select the data.

Number Name Default Type Description
1 type String The type of query to use.
Valid values are: DATE_RANGE, DATE_RANGE_S, NUM_RANGE, RANGE AND REL
2 rep_val String This is the Relationship ID, Tag, Obj.ID list in () or Char List in [].
It essentially points to the source of the use input question.
3 query_val String Query Relationship ID or Tag.
This tells the command what data to reference within the query.
4 addit_query String Additional query to tag on the end of the generated query (if any query is generated).
5 join_order String This can be used to add any order parameters to the query if it is generated.
- wrap_exp String

You can use this to wrap the generated query expression in another query expression (if any query is generated).

Use the {wiz_exp} to show where to insert the generated expression. e.g. $C(^T=1234:{wiz_exp})

- addit_rel_query String

Additional Join Relationship Query text.

Use this to add additional query content to the first parameter in a query expression.

Basic Date Range Example

You could use this if you were storing the Order date in the secondary value on an object and the users input for the date range was held in two XML fields called order_date_from and order_date_to.

NOTE: The first two lines are just to populate the current object with a couple of demonstration dates.

^W BETWEEN DATE_VAL('01/01/2021') AND DATE_VAL('31/12/2022')
Numeric Range Example

You could use this if you were storing the Order value in an XML field on an object and the users input for the order value range was held in two XML fields called order_value_from and order_value_to.

NOTE: You need to provide the full code necessary to access the value on the data.
In this case it is XML_VAL('order_val', 0.0). The 0.00 tells the query interpreter to use floating point 0 as the default if no value is stored in the XML.

XML_VAL('order_val', 0.00) BETWEEN 100 AND 2000
Relationship Example Example

Use this to generate a JOIN Query based on the relationships between two objects.

So you might have the report object offering a list of valid order states to select that stores the result in a relationship.
You then want to use those valid states in the query to reference the relationship between the Order and its order state.

$C(^RI=9876:^ID in (8496, 8497, 8498, 8499, 8500, 8501, 8503))
to add a Comment.