Query Data
Query Designer in TIVITY is similar to a visual data retrieval tool you might use with a relational database model or NoSQL instance.
Last updated
Query Designer in TIVITY is similar to a visual data retrieval tool you might use with a relational database model or NoSQL instance.
Last updated
Query Designer enables you to manage queries and define the data selection from your database. Queries are composed of a data source (what you're inspecting), a field selection (what information you want to see) and conditions (what you're looking for). In this article we will introduce you to the flexible features of the Query Designer.
You can edit, delete, and clone queries, or export your query definition for use in another app. Head to your Workspace > Apps and click on the gear icon to activate the configuration mode of your apps. Next, navigate to the app you want to configure and click on the gear icon. In the Data section you click on Queries to access the list of existing queries.
Click on New Query to create a new definition of how to select and display data in your application. Get Started with Query Designer describes the process of creating a query in detail.
Click on the query name from the list to open the query designer. The remaining functionality is identical to creating a new query, as described in Get Started with Query Designer.
Modify your existing query as needed, optionally Validate the current definition, and click Save to store your changes.
Either you open the drop-down menu on the right-hand side to the query name and choose Delete or you click on the query name from the list and click on Delete to remove the query.
Confirm to delete the selected query with a click on Yes, delete it.
In scenarios where you need the same query with minimal variations you don't have to create each query from scratch but you can duplicate an existing one. Open the drop-down menu on the right-hand side to the query name from the list and choose Clone.
After a short while a new query with a - Copy
suffix will be added to the list of queries. You can create multiple copies of the same query.
Prior to be able to clone a query it has to be validated successfully. If the copying process fails, open the query for review and validate it.
Apart from being able to create and manage queries it is interesting to know whether and how a particular query is used in an application. Open the drop-down menu on the right-hand side to the query name in the list and choose Used By.
The Query Designer shows you in which Layouts, Classes, Functions, Selections, Templates, and Workflows the selected query is used.
Click on Close to return back to the list of queries.
To save your queries for backup or to transfer queries between applications and workspaces you would export them. Open the drop-down menu on the right-hand side to the query name in the list and choose Export.
The platform is going to assemble a ZIP archive and will offer you to download it to your system. The default file name is queries.zip
.
The generated ZIP archive is potentially password-protected.
ToDo: Import fails due to invalid format of previously exported queries file.
Navigate to your Workspace > Apps and click on the gear icon to activate the configuration mode of your apps. Next, click on the gear icon of the app you want to configure. In the Data section you click on Queries to access the Query Designer. Click Import Queries.
Next, either drop an exported file from your system into the designated area or click on one of the available options to import your queries. Click Execute after the file has been uploaded completely.
After successful import the queries either have been created as new entries based on their original name or the suffix - Copy
has been added to any existing query to avoid name conflicts.
Depending on the amount of queries the overview might become a crowded place with lots of entries. The Grouping feature enables you to organise your queries by a specific criteria, e.g. by First Letter (default) or by Last Modified date.
After you completed your changes in the Query Designer you scroll down to the bottom of the Config Mode in the left-hand side Workspace pane and click on Leave Config Mode. Then you click on the tick next to the Apps caption to return to your Workspace.
Query Designer is a powerful tool to level up your apps, and with such power comes complexity. Take a look at some of our other articles about the different sections in the Query Designer for even more help.
Query Designer's Common attributes, Fields, Conditions and Default Values provide you with an insight into the detailed definition of your queries.
Query Designer Preview offers the resulting data of your query to verify the expected information.
Script Configuration has further details on built-in functions and how to create and manage your own scripts.
To change a grouping of queries click on the Actions menu at the top right of the list and choose an option. The list will be arranged immediately.