Using Named Queries on Dataset Properties
The majority of your Named Query bindings will most likely be on a dataset type property. When placed on a Dataset type property, only a single Named Query needs to be specified. An explanation of the various fields on the binding are detailed below:
- Path: Here you can enter in the path to the Named Query. Click on the Search icon to view a list of available Named Queries.
- Parameters: Here you can see a table of all defined Named Query parameters. You can pass in property or Tag values to the parameters by first highlighting the parameter and then selecting either the Insert Property icon or the Tag icon
- Query: The query section shows what Named Query looks like. Note that you can't modify the query on this page.
- Polling Mode: Here you can set the Polling Mode of the Named Query binding based on the Polling Rate.
- Retain Rows: If true, any rows that you have returned within the Designer will be saved along with the window. This may slow window load times.
Using Named Queries on Scalar Properties
When placed on a non-dataset type property (such as a String or Integer), then the Named Query binding allows for a second Named Query to be specified in the case that the user can update the value on the property. This provides an opportunity to both return and update values in the database from the same component.
The configuration is very similar to a Named Query binding on a dataset property. You need to specify a Named Query path, set up your Parameters, and choose a Polling Mode. You can finish setup at this point, leaving the update query disabled so that the property will simply pull the value from the database.
However, if you want the binding to be bidirectional, you need to specify an UPDATE query. This works similar to a SELECT query, in that you need to select the path to the Named Query and set up any Parameters. However, it is important to make sure that the Named Query chosen for the UPDATE query is in fact setup as an UPDATE query by setting the Query Type property on the Authoring section of the Named Query.