Skip to main content
Version: 8.3

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
Path Mode
New in 8.3.7
Allows users to choose between binding a direct path to a Named Query, or using an expression to make the binding dynamic.
PathThe path to the Named Query the binding will use. Clicking on the Search icon will produce a list of all available Named Queries.
ParametersDisplays a table of all defined Named Query parameters. This field will be different depending on if you select Direct or Expression for the Path Mode. Differences include:
  • Direct: Parameters will be automatically populated with the parameters of the selected Named Query. You can still pass in property or tag values to the parameters by first highlighting the parameter, then selecting either the Property icon or the Tag icon.
  • Expression: Users will be able to both set their own parameters on the Query binding itself, and pass in property or tag values.
Note: The fields under the Value column are evaluated as expressions, so strings will require quotations marks.
Return FormatSpecifies how the query results are returned. Options are:
  • auto: Query results are returned in the format native to the database, which is 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.
OptionsA set of various options related to the Query binding itself. See the Options table below for more information.
Binding PreviewA toggleable field that gives a preview of what the Query Binding will look like.

Options​

Property NameDescription
EnabledAllows the component to be enabled and interactive (depending on the component) on the screen.
Overlay Opt-OutIndicates whether the component should reflect the quality code with a component overlay if the target of the binding returns a non-good quality code.
Cache & ShareWhen enabled, the query will utilize a polling engine that is shared across all running Perspective sessions. This optimization is helpful for consolidating multiple identical polling tasks, particularly when you have many Perspective sessions running at once. The polling engine will run the query once, cache the value, and then 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. Disabling this option will bypass the cache.
Designer LimitForces the results of the query to be limited to a few rows when run in the Designer.
PollingSets the polling mode of the Named Query binding based on the polling rate, in seconds.