The Query Binding allows you to pull data from the database using a named query. In Perspective, the Query Binding requires the use of Named QueriesYou can't type a query here from this interface, a Named Query must already exist. You can also add transforms. For more information, see Transforms



On this page ...

IULocgo


Query Binding

Binding Properties

Property NameDescription
Path

Here you can enter in the path to the Named Query. Click on the Search  icon to get a list of all available Named Queries.

Return Format

The Return format specifies how the query results are returned. Options are auto, json, dataset, or scalar.

  • auto:  Query results are returned in the format native to the database (typically dataset).
  • json: Query results are returned in json format.  
  • dataset: Query results are returned in dataset format.  
  • scalar: Returns the first element from the query result. This format is best when a single value is expected.
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 Property icon or the Tag icon.

Note: The fields under the Value column are evaluated as expressions, so strings will require quotations marks. 

QueryIn the query section, there is nothing to configure, but you can see what the Named Query you have selected looks like.
Options
Enabled

Allows the component to be active/in use /interactive on the screen.

Overlay Opt-Out

If the target of the binding returns a non-good quality code, this setting indicates whether the component should reflect the quality code with a component overlay.

Bypass cache

This will cause the query to bypass/ignore any cached values from the Named Query and run every time it is called.

This feature was changed in Ignition version 8.1.12:

This option was removed in 8.1.12 and replaced with Cache & Share
Cache & Share

The following feature is new in Ignition version 8.1.12
Click here to check out the other new features
When this setting is enabled, the query will utilize a polling engine that is shared across all running Perspective sessions. The polling engine will run the query once, cache the value, and deliver the results to all registered consumers. The cache persists for a period of time that matches the configured poll rate. If polling is off, the default cache duration is 250 milliseconds. This optimization is helpful for consolidating multiple identical polling tasks, particularly when you have many Perspective sessions running at once. Disabling this option will bypass the cache.

Designer Limit

This setting will force the results of the query to be limited to a few rows when run in the Designer.

PollingHere you can set the Polling Mode of the Named Query binding based on the Polling rate.


Related Topics ...


  • No labels