Skip to main content
Version: 8.1

Query Bindings in Perspective

Inductive University

Query Bindings

Watch the video

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 Queries. You 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.

Binding Properties​

Property NameDescription
PathHere 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 FormatThe Return format specifies how the query results are returned. Options are:
  • 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.
ParametersHere 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​

Property NameDescription
EnabledAllows the component to be active/in use /interactive on the screen.
Overlay Opt-OutIf 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 cacheThis will cause the query to bypass/ignore any cached values from the Named Query and run every time it is called.

​
Changed in 8.1.12
This option was removed in 8.1.12 and replaced with Cache & Share
Cache & Share​
New in 8.1.12
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 LimitThis 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.