Favorites
Last updated
Was this helpful?
Last updated
Was this helpful?
You can save any DQL queries as a favorite for easy and quick access later.
You can load and save favorites from the Edit menu or the DQL editor's context menu. Simply use the Load from Favorites or Save to Favorites menu items available in those menus at any time while in the DQL editor.
Depending on whether there is a text selection or not, either the whole content of the code area or only the selected text will be saved as a favorite. Ideally complete statements should be selected and saved as favorites, but it is possible to save incomplete statements as well if desired. Incomplete favorites do need to be closed after being loaded to form a valid statement that can be executed correctly.
When saving a query to Favorites, a number of properties can be set to catalog, sort and find favorites later.
Favorites can also be edited later if changes are needed (see Manage Favorites below for editing existing favorites).
Name Name of the favorite.
Category Select a category for your favorite. Your favorite query will be grouped together with other favorites under the same category.
Object type Enter the object type used in this query.
Show in Favorites Select if you want the favorite to be displayed in the Favorites menu. Unchecking this will hide the favorite from the Favorites menu and the Favorites Panel in the Repository Navigator.
Show in Repository
Enter any repository this particular favorite should be limited to.
An exclamation mark placed in front of the repository name (e.g. !testrepository
) hides the favorite for the respective repository.
Leaving the field empty will display the favorite in all repositories.
Repositories can also be selected by opening the menu to the right of this field, but only known (previously used) repositories will be displayed in the list.
Description Enter an (optional) description of what this favorite does.
DQL Query Displays the DQL query for this favorite.
Favorites can be managed directly from the context menu, which you can access by right-clicking on the favorite you want to modify.
Once you right-click, the context menu will be displayed, containing the following options:
Run Favorite: Runs the selected favorite.
Edit: Opens the edit window for the selected favorite.
Rename: Activates renaming for the selected favorite.
Delete: Deletes the selected favorite.
Add Favorite: Allows you to add a new favorite.
Add Category: Allows you to add a new category.
Favorites by Category: Displays favorites by category.
Favorites by Object Type: Displays favorites by object type.
Show Hidden: Allows you to select whether to display hidden favorites.
Import from File: Allows you to import favorites from a file.
Export to File: Allows you to export the selected favorite or category to a file.
Additionally:
Favorites can be moved from one category to another using drag and drop.
Standard/shared favorites cannot be edited or moved, but they can be copied using the copy function or drag and drop.
It is not possible to restore a deleted favorite, so take care when using this action.
Template Queries are DQL queries which contain placeholders for values. If a Template Query is executed, the user is requested to enter values for the placeholders.
Placeholders consist of a freely selectable name, which is enclosed by curved clips. They can be inserted either manually or with a function available in the context menu of the input window. Template Queries can contain any number of placeholders.
If placeholders appear in a query more than once, they always represent the same value. Please keep in mind that placeholder names are case sensitive.
If for any reason an opening curved clip is needed in the DQL query for another purpose than for beginning a placeholder, it must be masked with a double opening curved clip, like … where object_name like ‘{{%’
.
The behavior of placeholders can be improved by adding placeholder options, using the Edit template field function from the context menu
Name: Name of the placeholder
Label: Caption displayed in the input dialog. If no label is available, the name will be displayed
Default Value: The default value shown in the input control. It is valid until another value is entered or selected
Mandatory: Check this box, if it is a mandatory field
Use cached query: If checked, the result of the DQL query used to fill the value assistance will be cached to improve performance, but changes to the underlying values will be ignored. Select Refresh Value lists from the Session menu to clear the cache
Value List Type: To assist the user, different types of value lists are available:
None: No value list
Fixed list: A list with fixed values that must be predefined in the control Values
DQL Query: A DQL query that fills the list dynamically
Date Picker: Displays a date picker control
File Open Dialog: Opens a file open dialog. A list of available file types can be defined in the control Values.
Directory Selector: Allows selection of a directory from the local file system.
Cabinet/Folder Selector: Allows selection of a cabinet or folder from the currently connected repository.
If the result of a DQL query contains more than one attribute, the value of the first column will be displayed in the value list, the corresponding value of the second column will be inserted in the query.
In a fixed value list, the displayed value and the inserted value can be separated by ||, (e.g. Label||Value)
The query Select object_name, r_object_id from dm_document
will fill the list with the object_name attribute of all dm_document objects. Selecting a name from the list returns the r_object_id
for the placeholder value.
Check Syntax: Check the syntax of the current DQL query. This feature is only available, if a valid session exists