Wiki source code of Abfragen erstellen

Last modified by Sabrina V. on 2025/03/28 12:45

Hide last authors
Jannis Klein 1.1 1 {{aagon.floatingbox/}}
2
Jannis Klein 11.1 3 You can create a query either centrally via Query Management (//Client Management// > //Query Management//) or via the ribbon bar under the //Query Actions //tab. If you want the query to be sorted in a specific folder, you can first select it and then add the new query there. To do this, click the //Add// button. A wizard will open that will guide you through the necessary steps for creating the query.
Jannis Klein 1.1 4
Jannis Klein 11.1 5 It is also possible to create a query without using the wizard. To do this, select Expert Mode. To select Clients in the Query or to open their Client Details, the Client ID must also be queried. By entering the SQL code directly, you can also access and execute the stored procedures of the ACMP Database. Stored procedures are instructions in the database system that can be used to call up complete sequences of commands from the client.
Jannis Klein 1.1 6
Jannis Klein 9.1 7
Jannis Klein 11.1 8 = Create Query with the wizard =
Jannis Klein 9.1 9
Jannis Klein 11.1 10 == General properties ==
Jannis Klein 1.1 11
Jannis Klein 11.1 12 Select an output directory ([[image:Auswählen Icon.png||height="18" width="20"]]) and enter a name for your query. Optionally, you can also add a description to the query if you want to store additional information for yourself or your colleagues. This description can help you choose the right query in the future. The next step is to select the query base. This determines the available query values, which are essential for you to continue. If you want to create a client based query, you will have different fields to those available for a query base based on cost centres or contracts.
13
Jannis Klein 1.1 14 {{aagon.infobox}}
Jannis Klein 11.1 15 You cannot select fields from external categories that have not been released by ACMP. You will also not get these items if you enter them explicitly via the search bar.
Jannis Klein 1.1 16 {{/aagon.infobox}}
17
Jannis Klein 11.1 18 Enable the// //[[Create advanced Query>>doc:.Erweiterte Abfragen erstellen.WebHome]] option only if you want to create a more complex, detailed query using SQL statements, for example with the help of the SQL Wizard. Otherwise, click //Next >//.
Jannis Klein 1.1 19
20 {{aagon.infobox}}
Jannis Klein 11.1 21 Due to the complex database structure of ACMP, we recommend that you only create an advanced query if you have the appropriate knowledge.
Jannis Klein 1.1 22 {{/aagon.infobox}}
23
24 {{figure}}
Sabrina V. 6.1 25 [[image:65_Abfrageverwaltung_Abfrage erstellen Allgemein_926.png||data-xwiki-image-style-alignment="center"]]
Jannis Klein 1.1 26
27 {{figureCaption}}
Jannis Klein 11.1 28 Create new Query (General)
Jannis Klein 1.1 29 {{/figureCaption}}
30 {{/figure}}
31
Jannis Klein 11.1 32 == Selecting fields ==
Jannis Klein 1.1 33
Jannis Klein 11.1 34 On the next page of the wizard, you need to select the fields you want to query. The available fields are sorted by categories. Depending on the selected query base, only selected fields will be displayed, not all. Drag and drop the required values into the right hand side of the dialogue and arrange them. Alternatively, you can use the search box, which will filter all fields containing your search term. The fields are divided into [[Single value fields>>doc:.Filteroptionen anwenden.WebHome]] ([[image:image-20240702131956-1.png]]) und [[multi value fields>>doc:.Filteroptionen anwenden.WebHome]] ([[image:image-20240702132604-3.png]]).
Jannis Klein 1.1 35
36 {{figure}}
Sabrina V. 6.1 37 [[image:65_Abfrageverwaltung_Felder auswählen_926.png||data-xwiki-image-style-alignment="center"]]
Jannis Klein 1.1 38
39 {{figureCaption}}
Jannis Klein 11.1 40 Create Query (Selecting fields)
Jannis Klein 1.1 41 {{/figureCaption}}
42 {{/figure}}
43
Jannis Klein 11.1 44 In addition to the individual fields you can select, you can also influence the sorting of the results. To do this, tick the appropriate box next to the field; by clicking repeatedly, you can use the arrow directions to decide how the field is sorted. Tick the box if you want the dates to be output either in RAW form or in upper case. Click //Next >// again to move to the next page.
Jannis Klein 1.1 45
46 {{aagon.infobox}}
Jannis Klein 11.1 47 The larger (and more complex) the query, the longer it will take to process the data.
Jannis Klein 1.1 48 {{/aagon.infobox}}
49
Jannis Klein 11.1 50 == Select filter ==
Jannis Klein 1.1 51
Jannis Klein 11.1 52 To get the results of the Query to be displayed even more specifically, you can use filters on the following pages. The Query Results can be narrowed down using the operators and conditions that you can define here. The following operators are available:
Jannis Klein 1.1 53
54 (% style="width:980px" %)
Jannis Klein 11.1 55 |**Operator**|(% style="width:895px" %)**Description**
56 |OR|(% style="width:895px" %)Using the OR operator, you can create conditions under which either value X **or value** Y should be used as a field. Example: If you want to create a query where the operating system Windows 10 OR Windows 11 is running.
57 |AND|(% style="width:895px" %)You can use the AND operator to create conditions in which multiple values should apply. Example: You only want to filter clients from a specific domain with the Windows 10 operating system. In this case, only clients within the results list where both conditions (domain and operating system) are met would be displayed.
58 |NOT|(% style="width:895px" %)If you do NOT select as a condition, you exclude values from the Query (e.g. you can call up all Clients in a Query except Clients with a certain operating system). You can use the negation operator to negate individual filters.
Jannis Klein 1.1 59
Jannis Klein 11.1 60 Drag the field you want to filter into the field on the right, then enter your criteria in the input mask that appears.
Jannis Klein 1.1 61
62 {{figure}}
Sabrina V. 6.1 63 [[image:65_Abfrageverwaltung_Filter auswählen_814.png||data-xwiki-image-style-alignment="center"]]
Jannis Klein 1.1 64
65 {{figureCaption}}
Jannis Klein 11.1 66 Selecting a filter for a query (example of a linked AND condition)
Jannis Klein 1.1 67 {{/figureCaption}}
68 {{/figure}}
69
Jannis Klein 11.1 70 Depending on the type, you can also link multiple values together to create individual conditions. Linking multiple values and the resulting conditions (e.g. X OR (Y AND Z) condition) also allows you to combine existing conditions. To do this, drag a condition onto an existing AND condition. Both values are set in a combined AND condition. Drag another value onto the AND to create an OR link for the existing values. If the entries are dragged outside the condition, they are simply registered as two individual filters. If you want to edit entries, you can open them by double-clicking and delete them by pressing the Delete key. The following example shows what a filter looks like. In this case, the filter is set for the computer name and a primary IP address.
Jannis Klein 1.1 71
72 {{aagon.infobox}}
Jannis Klein 11.1 73 The values for the filters do not have to match the values already selected. For example, you can display only the Host Name even if you are filtering by your Clients' IP Addresses.
Jannis Klein 1.1 74 {{/aagon.infobox}}
75
Jannis Klein 11.1 76 Once you have selected the filters, click //Next >// to continue.
Jannis Klein 1.1 77
Jannis Klein 11.1 78 == Grouping tables ==
Jannis Klein 9.1 79
Jannis Klein 11.1 80 Depending on the query fields selected, there may be an additional step in the wizard. If you have selected a query field of type multi value ([[image:image-20240702132604-3.png]]), a 1:n relationship is possible. This means that the alignment may affect the result. This is the case if you have selected one or more fields that can assign multiple results to a client, such as the number of printers. The logic behind this is that a printer can be selected by several clients. In everyday work, there is often only one printer available for an entire floor, so several people have to share it. If, for example, the result is aligned by client, the clients are listed and the multiple results are displayed in a sub-form. If you choose to sort by printer, all printers will be listed and clients will be listed in a sub-form.
Jannis Klein 9.1 81
Jannis Klein 11.1 82 Select the table entry by which you want to sort your query and click //Next >//.
Jannis Klein 1.1 83
84 {{figure}}
Sabrina V. 6.1 85 [[image:65_Abfrageverwaltung_Angeordnet nach_666.png||data-xwiki-image-style-alignment="center"]]
Jannis Klein 1.1 86
87 {{figureCaption}}
Jannis Klein 11.1 88 Query alignment
Jannis Klein 1.1 89 {{/figureCaption}}
90 {{/figure}}
91
Jannis Klein 11.1 92 == Security and Permissions ==
Jannis Klein 9.1 93
Jannis Klein 11.1 94 The next page of the wizard allows you to make security settings. Specify which user or group has specific rights to this query.
95 To grant a group or user rights to the query, you must first add them to the selection by ticking the appropriate checkbox. By default, all rights are granted to both groups and users.
Jannis Klein 1.1 96
97 (% style="width:1337px" %)
Jannis Klein 11.1 98 |**Security option**|(% style="width:1184px" %)**Description**
99 |Editing|The user or group has the right to process the query. This also includes the execution and visibility of the query.
100 |Execution|The right to //execute and //view Query Results is included in the Execution of Queries. If the view is disabled, the Query is not visible to the user or group. The activated option automatically includes visibility.
101 |Visible|A user or group that is only allowed to see the Query cannot edit or execute it.
Jannis Klein 1.1 102
Jannis Klein 11.1 103 Use the //Add// button to add more users or groups and the //Remove// button to delete saved users and groups. To do this, select the entry and confirm the prompt.
Jannis Klein 1.1 104
Jannis Klein 11.1 105 The users and groups stored here can be accessed in the [[User Management>>doc:ACMP.67.ACMP-Solutions.System.Benutzerverwaltung.WebHome]].
Jannis Klein 1.1 106
Jannis Klein 11.1 107 The available rights options are Allow, Deny and Neutral:
Jannis Klein 1.1 108
Jannis Klein 11.1 109 * Deny has the highest priority. Example: If you disallow a group from running a query, but allow an explicit user from that group, that user will still not be able to run the query. This is due to the priority of group permissions, which in some cases may be higher than that of an individual user.
110 * A neutral right is always based on other rights that have been granted. For example: If a user is allowed to do something through a group and you grant them a neutral right, they have received this right through the group.
111
Jannis Klein 1.1 112 {{figure}}
Sabrina V. 6.1 113 [[image:65_Abfrageverwaltung_Sicherheit_736.png||data-xwiki-image-style-alignment="center"]]
Jannis Klein 1.1 114
115 {{figureCaption}}
Jannis Klein 11.1 116 Manage user and group rights
Jannis Klein 1.1 117 {{/figureCaption}}
118 {{/figure}}
119
Jannis Klein 11.1 120 Continue with your work and click //Next >// to proceed to the final step of creating a request.
Jannis Klein 1.1 121
Jannis Klein 11.1 122 == Query icon ==
Jannis Klein 9.1 123
Jannis Klein 11.1 124 Under //Query// Icon you can assign a suitable icon to your query. Use one of the icons provided or upload your own. Note that icons must be in *.bmp or *.ico format and must not exceed 16x16 pixels in size, otherwise only part of the original file can be used. If you want to select a default icon again, click on [[image:image-20240702132944-4.png]] .
Jannis Klein 9.1 125
Jannis Klein 1.1 126 {{figure}}
Sabrina V. 6.1 127 [[image:65_Abfrageverwaltung_Abfrage-Icon_666.png||data-xwiki-image-style-alignment="center"]]
Jannis Klein 1.1 128
129 {{figureCaption}}
Jannis Klein 11.1 130 Assign Query icon
Jannis Klein 1.1 131 {{/figureCaption}}
132 {{/figure}}
133
Jannis Klein 11.1 134 Exit the wizard and create the query by clicking //Finish//. The query is now available in the Query Management.
Jannis Klein 1.1 135
136 {{aagon.infobox}}
Jannis Klein 11.1 137 If you want to use the newly created query to import inventoried devices as assets, you can proceed with the export.
Jannis Klein 1.1 138 {{/aagon.infobox}}
© Aagon GmbH 2025
Besuchen Sie unsere neue Aagon-Community