Chat now with support
Chat mit Support

Foglight 7.1.0 - Web Component Tutorial

Introducing the Web Component Framework The Web Component Framework Configuring Views and Context Queries Functions Bindings Additional Components

Parameters in Queries

Since a Query can have parameters, it can be made aware of bindings. Their values replace the specified From Parameters in the query. The Query Binding parameters must exactly match the Required Parameters.

The query attributes that can be replaced by parameter values are the query’s Root Reference Path, the Filter Results Based on Top N value, and a comparison condition in a Where clause. The Root Path can only be replaced by a parameter that is a data object or a list of data objects. The value of the parameter becomes the root object for the query execution.

You can add additional path information under a parameter used for the Root Path. In this case, the parameter value is assumed to be a data object, but the value used is the given path into that data object.

For more information about using parameters, see Query Definition Settings and Deriving a Query from Another Query . For information about aggregations see Creating an Aggregation .

Summary of Creating a Query

Creating a query extracts data from a data source. Creating a query involves defining the following elements:

If parameters are passed to a query, you can use them to compare the properties of selected objects to refine the Where clause.

Copying a Query

Copying is a fast way of creating a new query. It is also a way to create a modified version of a System query. You can copy any query, including your own User query, a System query, or a query created by another user.

You cannot create a copy of a query and give it the same name as another query in your module. If you enter a name that is already in use, an alert icon () is displayed beside the field and the Save button is disabled.

1
Select Configuration > Definitions in the navigation panel.
4
Click Add.
The Add Query dialog box is displayed.
5
Select the Copy an Existing Query tab.
7

Deriving a Query from Another Query

Deriving a query from another query allows you to create a variant of an existing query. You can derive from any query, including your own User query, a System query, or a query created by another user. You can even derive a query from another derived query. The query from which a derived query is made is called its base query, and is permanently linked to it.

You cannot create a derived query and give it the same name as another query in your module. If you enter a name that is already in use, an alert icon () is displayed beside the field and the Save button is disabled.

A derived query may extend its base query’s list of Required Parameters, and replace its Filter Results Based on TopN, Aggregations, Order By and Where sections. If the derived query adds Required Parameters, their numerical order comes after that of the base query.

A simple example of where you might want to use derived queries is a base query that selects a group of Events, and a derived query that aggregates those events into a maximum severity.

In the editor, normally you are not allowed to edit or replace the Filter Results Based on Top N, Aggregation, Order By or Where settings in a derived query if those settings are already established in the base query. However, it is possible to get into a situation where both the base query and the derived query contain settings for any of these properties as follows:

In this situation, both queries have settings for Aggregations. The query editor will display warnings on both of these queries about that fact. If you edit the derived query again, you will be allowed to modify the Aggregations setting. However, if you remove that setting, it reverts to using the base query's Aggregations setting, and that setting is no longer editable.

4
Click Add.
The Add Query dialog box is displayed.
5
Select Derive from an Existing Query and click OK.
Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen