For complex queries on meta- and user data DataView provides a dynamic query mask. Starting from the main entity you can compile individual query lists and search data for instance across several linked entities in the data model.
This is how to compile an individual query list:
It is a precondition for the query that a title has already been assigned to the entity.
The main entity for one or several query lists is the entity that represents the starting point of the query in the data model, or its master table that is to provide the data to be found, respectively.
After Get the default master list for the main entity it will appear in the first folder. It is used as a template and cannot be modified.
A new folder will be opened which first displays the copy of the default master list as the new query list.
Insert new fields/columns into the query list by using the same procedure to select and drag fields/columns from any source mask to the desired position in the query list. Source mask is can be the DataView system forms (if you search meta data) or any user mask (if you search user data).
Query results in query lists can optionally be inserted via drag&drop into masks pointing to the master table of the main entity. This allows you to completely see and edit the records found. If the target mask already contain data, they will be deleted during drag&drop.
Created canary lists for a main entity are not saved in the repository but in a user-specific file in the server directory <frm>
. After closing and reopening the query mask and loading the main entity, all the query lists you already created for this main entity will be available again.
The structure of the Where condition for the Select statement, which is issued during a query by DataView, is determined by the selection of the main entity, the selection of fields/columns in a query list as well as by their sequence. Thus, please observe the following rules for the layout of query lists.
The call of the query mask from within the application is done with the help of iwf_frm_ent ENTITY USRMGN_FORM.
Let us assume you already created masks with context menus during application development. Now you want to find all masks whose Select menu contains an Edit item. The query in the data model of DataView includes the system entities T_MASK (mask data), T_MENU (menu data) and T_SELECTION (selection data). You select Mask Data as main entity, because the corresponding master table is to provide the unknown data. First you insert the required significant fields of the included entities (in the sequence defined by the data model) into the new query list. Additionally, the key field Menu/Sel must be inserted after Mask Name to make sure that the query includes the link mask-select-menu and not one of the other six possible links between masks and menu/button areas. Including the attribute field Selection Text is optional and is used here to enter the query term Update. If you also want to see the titles of the masks found, you can additionally incorporate the attribute field Mask Title between Mask Name and Menu/Sel.