Common
Query Designer is divided into several sections - Common, Fields, Conditions, Default Values and Preview. This article provides detailed information about the Common section.
Last updated
Query Designer is divided into several sections - Common, Fields, Conditions, Default Values and Preview. This article provides detailed information about the Common section.
Last updated
The Common section contains general properties of a query. In this section you can specify the name of the query as shown on the list of queries, the data context from which the query retrieves any information needed, and the credentials which are necessary to edit and run the query in your app. Here you would also specify whether the query is visible to other users or bound to reporting.
Optionally, you can give your query a Key or match code. This property can be helpful in other drop-down or selection menus in your app to quickly access and choose a query. In the list of queries the value of Key is shown in parentheses behind the name of the query.
The Key is a unique distinction between queries which is displayed in the Query Designer, but will not be visible to the end user in the finished app
The Source of a query specifies the data source or in our context the Class of an entity in the app.
The selection of a Source is compulsory in a query.
The Query Context defines the relationship that applies to the Source of a query. It is needed in case that you want to retrieve data from a certain type of Class (as specified as Source) only.
A Query Context represents a grouping of records provided by the Source and is defined as a Class.
Commonly an app is based on more than one Class and there are relationships between those classes. An often used approach is the representation of data in a one-to-many relationship, e.g. a ToDo
entry (Class) can have many Documents
(Class) allocated to it. Or otherwise a document is connected to a ToDo entry.
A document however does not necessarily have to be assigned to a ToDo record but could either be linked to another Class, e.g. a Reminder, or could be stored in the app as standalone.
By providing a Query Context of class ToDo in your query the result will show data from documents that are associated to a ToDo entry only. Other records of class document will be ignored.
Launching a query and seeing the result in your app requires permissions. The Run Credential provides access to either a group of users or a single user in your app.
Usually the choice of the Run Credential would be an entry with low permissions, e.g. a viewer account or group, only.
The selection of Run Credential is compulsory for a query. You should consider the principle of least privileges to assign to your users in order to access and run a query.
Permissions to edit a query are separate from the ability to see the result. The Edit Credential grants permissions to either a group of users or an individual user in your app to modify a query.
The selection of your Edit Credential would be a role of an editor with slightly more permissions than a viewer but not as much as an administrator.
The choice of Edit Credential is compulsory for a query.
An invisible query can still be used in other areas of the app, e.g. the Layout Designer.
If the checkbox Use as report
is selected the query is automatically available in the Reporting App and displayed in the section called Reports provided by Apps
.
The common Name as well as a Description of a query can be given in multiple languages. The localised information is displayed in compliance with the accepted language in the web browser of a user.
Pre-Script Configuration gives you the possibility to write a script, within which you can set values for the purpose of using them in the 'Conditions' tab of the designer. This enables you to use these values for condition(s) before the execution of the query.
Each condition value with the expression format {Parameter.} will be replaced by a parameter value defined in the script (with the variable name ).
The context of the script is passed to the script as well:
Context.ApplicationId (ID of the application the selection is executed in)
Context.ClassId (ID of the class of the selection or the selection is executed with)
Context.OfficeId (ID of the office the selection is executed in)
Query.ContextLinkId (the link ID from the context class to the source class of the selection)
Query.ContextInstanceId (ID of the instance of the selection context)
Query.ContextClassId (ID of the class used in the selection context)
Variables Query.ContextLinkId, Query.ContextInstanceId and Query.ContextClassId are only available if the Query Context for the Source has been set, as visible in the following sample image:
Currently supported languages are English, German and French.
Open the selection control by clicking on the icon and either scroll the list for an entry or type the name of the class in the Search field at the top of the selection to choose a Source for your query.
Open the selection control by clicking on the icon and either scroll the list for an entry or type the name of the class in the Search field at the top of the selection to choose a Query Context for your query.
Open the selection control by clicking on the icon and either scroll the list for an entry or type the name of the class in the Search field at the top of the selection to choose a Run Credential entry for your query. If there are multiple entries of the same name the app is shown as suffix in parenthesis.
Open the selection control by clicking on the icon and either scroll the list for an entry or type the name of the class in the Search field at the top of the selection to choose a Edit Credential entry for your query. If there are multiple entries of the same name the app is shown as suffix in parenthesis.
The checkbox Invisible for users
allows you to hide queries while they are still in development and to remove a query from menus and selections available to the user directly. An invisible query is marked with a crossed-out eye icon in the list of Queries.