Query tool

<< Click to Display Table of Contents >>

dpPower > Menu reference > Tools >

Query tool

The query tool combines a number of functions and consists of a function window and a result window.

In the function window, you decide which method you want to use to ask selection questions to the database. Here you can also create, save and edit your own questions, enter logical conditions and geographic boundaries for your selection.

In the results window to the right in the Query Tool, data is presented that matches the conditions in your search, i.e. all hits you get for a query. You can process the results by sorting by column content, exporting the results to a spreadsheet or to text format, and much more. Read more in the Edit the query result section.

 

The query tool content

In dpPower the searches are divided into three different tabs, Queries, Search and Reports. They all work essentially the same, and are grouped to make it easier for you to find a specific search query.

Queries - Use, create and save custom queries. The result from a query can be presented in several different forms, directly in a map window, in a table, in the form of a printout or exported to Microsoft's Excel format.

Reports - Generate reports. Either with free search strings or creation of advanced GIS reports by combining selection with spatial queries in the database.

Search - Search the database. Search for an object and display it on the map, or update and present its attribute data.

Tab

Description

Geographic selections

Own queries

Queries

Simpler types of questions on single object types or subtypes. Questions cover all object types in the application.

Yes

Yes

Reports

Advanced questions; selection from multiple object and subtypes.

Yes

Yes

(requires system permission)

Search

Custom questions with completed conditions, but not spatial conditions for geographic selections.

Yes

 

 

Open the query tool

1.Select Tools > Query tool. The Query tool opens.

 

Options to narrow the search results

Icon

Tool

Description

Active view

Allows you to ask for any object type/subtype within the active view.

Define area from existing object

Use this button to draw a geographical search area in the map view. You can then search for any object type/subtype within the defined search area.

Define area

Allows you to select an existing object in the map view that will make up the search area. An example of such an objects is a working area. You can search for any object type/subtype within the selected object's geographic boundaries.

Number of rows

Number of rows

Specifies the maximum number of rows (search hits or records) to display in the Result window when a query is returned. You can choose to display 150, 250, 500, 1000, 5000, 10000 or all rows. The setting changes to the default value when you press the Clear button or open the Query tool again.

Clear

Clear the search criteria

The Clear button is used to clear all search criteria and the maximum number of rows.

Search

Search results

Press Search when you are satisfied with the search criteria in order to get the results in the Result window.

Export to spreadsheet

Allows you to export the content in the Result window to a spreadsheet.

Export to text file

Allows you to export the content in the Result window to a text file.

Export to PDF

Allows you to export the content in the Result window to a PDF file.

Add coordinates in new coordinate system

Allows you to transform coordinate data in the Results window to an additional coordinate system.

 

More information

It is also possible to open the query tool by clicking on the icon in the toolbar or by using the shortcut key F11.

The search function is also available in the Search tab in the sidebar (F9).

 

Edit the query result

When you have obtained the desired data in the results window, you have the opportunity to edit, update and analyze the results. You can also display selected objects in the map view, create thematic maps and export the selection results as a text or Excel document.

Right-clicking on any entry in the results table displays a menu of options available for the item. Just like when you work with objects in the map view, you can choose here to, for example, edit the object's attribute table, show the object in another view, etc. Which options are available differ between the different applications.

Right-click on a column header to filter the results in the column. A filtering icon in the header indicates that the column has been filtered.

For more information on what you can do with tables see section Tables.

 

Show delivery point in current view

For generators and batteries that have a connection to customer equipment, you can right-click in the result table and select Show delivery point in current view.

 

Convert generator to customer equipment

Generators that are connected to the delivery point via an other line disconnecting device or an internal cable can be converted so that they are instead placed inside the delivery point as customer equipment. The generator symbol in the map/scheme will then be changed to a symbol indicating underlying production.

1.In the results table, right-click on the desired generators and select Object > Convert generator to customer equipment.

 

Edit one or more entries/rows

Edit attributes on individual entries

1.In the results table, right-click an entry and select Show/change attributes.

 

Edit multiple entries at once

The tool requires you to have administrator rights.

1.Run a query that contains the attribute you want to edit.

2.In the results table, select the entries you want to edit, right-click in the column for your attribute and select Change value for column [column title] and selected rows.

3.Select new value and press OK to change the selected rows.

 

Export results

Exporting the results means saving the data in the results window in a format that can be read by another program. In dpPower you can choose to export to a spreadsheet program, to a text file or as a PDF file.

 

Save the result to a spreadsheet program

1.You can choose to export a subset of the result in the results window: select the desired rows using the Ctrl and Shift keys.

2.Click the Export to Spreadsheet icon in the toolbar. the Save window opens.

3.In the Export Settings field on the right, check Export all [x] rows for all search hits or Export [x] selected rows to export only selected rows in the results window.

4.Select destination folder and enter a file name.

5.Click Save. The result is opened in a spreadsheet program.

 

Save the result as a text file

1.Click the Export to Text File icon in the toolbar. the Save window opens.

2.Select field separator on the right of the window. The default is the semicolon (;). Also choose if you want to export all rows or only the selected rows.

3.Enter file name, file format and directory where you want to save the file.

4.Click Save.

Before exporting the results, you can sort the field values ​​in ascending or descending order by clicking in the field header.

 

Display data in new coordinates

The function makes it possible to obtain a comprehensive list of coordinates for different objects in two different coordinate systems via the results window. You can choose to transform the coordinate data in the result window to one of the coordinate systems that are normally selectable in the application. The transformation appears in two new columns, X (Northing) and Y (Easting), which are added to the table in the results window.

1.When you have obtained a result that contains coordinate data: click the icon Add coordinates to new coordinate system in the toolbar. A dialog opens.

2.Specify the two applicable columns that contain coordinate data, Y (East) and X (North) respectively.

3.Specify the coordinate systems to be included in the transformation; On and off,

4.Finish by clicking OK. Two new columns containing the new coordinates are added to the table in the results window.

5.If additional coordinates need to be added, then repeat the above step and two new columns will be added to the table in the results window. Here you can then hold the mouse cursor over the new columns to see which coordinate system is selected.

 

Thematic presentation of a results column

You can create a thematic map based on the results in the results window. You can also add a legend to the map.

Predefined thematic maps can be found in the sidebar, see section The Thematic map tab.

1.Right-click in any field. Do not right-click in the field header.

2.Select Thematic Map for [field selection] in the right-click menu. A window with legend of the created thematic map opens.

3.Select the active view to see the thematic presentation. The objects in the active view are displayed according to the legend. The objects that do not meet the condition are shown in gray. It is also possible to use the checkboxes to show/hide certain attribute values. Components with hidden attribute values ​​(unchecked) are shown in gray.

The thematic map contains temporary graphics. By closing the legend window or refresh the map view (F5), the thematic map is deleted.

Some thematic maps can be saved, see section Save thematic map below.

You can save the objects from a row in the thematic map to the object list:

1.Right-click and select Save all objects to object list.

 

Print the thematic map

1.To create a plot of the thematic map, select File > Free plot. Press the Preview button. The Preview window opens.

2.You can place a legend in the thematic map, select Insert > Thematic map - place legend. The Select thematic legend window opens. It lists your searches in the Query Tool with the most recent search at the top.

3.Select the legend you want to place. Press the OK button. Place the legend by clicking once in the map, move the mouse pointer to the desired size of the legend and click once more. You can move the legend by clicking and dragging.

4.If you want to place additional legends in the map, repeat steps 2 and 3. To delete legends, select the legend in the map, right-click and select Delete or Delete all, or select Insert > Thematic map > Delete or Delete all.

5.To print the thematic map, select Print.... the Print window opens.

6.Press OK to confirm the printout.

 

Save thematic map

It is, in some cases, possible to save the thematic map you create via the right-click menu in the query tool results in order to reuse the map.

The function only works for those column fields that contain integer or decimal number intervals, such as Construction year.

1.Right-click in a field in the results list and select Thematic map for [field selection].

2.Double-click in the color and interval fields to change them, press Add interval to add additional intervals.

3.Press the map icon and select Save thematic map for [field selection].

4.Fill in Name and press Save.

Manage a saved thematic map:

1.Tap the map icon and select Manage thematic maps.

2.Select the desired thematic map and tap:

o - Edit name

o - Share. Shared thematic maps are also available in the sidebar tab Thematic maps > Shared thematic maps.

o- Remove

 

Apply a saved thematic map

1.Right-click in a field in the results list and select Apply thematic map > [desired map].