Specifying schematic diagram template query and identifier using Schematics Query/Identifier Editor

Specifying a schematic diagram template query is often required when that template is based on the Standard builder and used to build diagrams through custom queries. In the following example, suppose the objects stored in the database belong to different gas plants; a particular field in the database identifies each object per gas plant. It would be interesting to use this information to define a specific diagram template that would filter out the objects related to a given gas plant. Then, for each gas plant, you could generate a diagram. To define such a diagram template, you need to configure the query related to this template and the way each diagram identifier will be built. The steps below detail how to configure these parameters:

Schritte:
  1. Edit your schematic dataset within Schematic Dataset Editor.
  2. If the schematic dataset resources are not arranged in a tree view in the Schematic Items window, click Views on the Schematic Dataset Editor toolbar and click Project Tree.
  3. Click the desired schematic diagram template from the Schematic Dataset Editor tree.
  4. Click the Properties tab.
  5. Click the Query/Identifier button Query/Identifier button.

    The Query/Identifier Editor dialog box opens:

    Query/Identifier Editor dialog

  6. From the Data Source list (1), click the desired data source.

    All the data sources referenced in the schematic dataset are available in the drop-down list.

  7. From the Tables list (2), click the table on which the query is going to operate.

    The selected table's content is automatically displayed in area 3.

    HinweisHinweis:

    Double-clicking the desired table in the Tables list automatically fills the Queryarea (4) with a default query that returns all the records in that table.

  8. In the Queryarea (4), type your query SQL code.
  9. Click Show Results (5).

    The query results are displayed in the Results area (6):

    Query/Identifier Editor dialog - 2

  10. From the Fields list (7) where all the fields returned by the specified query are displayed, click the field that will be used to build the identifier for each diagram item and use the Move Right button (8) Move Right button to validate.

    The chosen field name is automatically displayed in the Identifier list (9):

    Query/Identifier Editor dialog - 3

    HinweisHinweis:
    • Several field names can be specified to build diagram identifiers. In that case, each identifier is obtained by concatenating all the fields in their entry sequence order—that is, in the Identifier list order. The concatenated fields are hyphenated. To modify the field sequence, click the field you want to move to another location from the Identifier list and either click the Move Up Move Up button or Move Down Move Down button arrow at the right of the Identifiers section until the list is ordered as desired.
    • String constants can also be configured to build diagram identifiers. Use the Add Identifier button Add Identifier button at the right of the Identifier section to add such a string in your identifiers; it will be concatenated with the other specified fields.
  11. Click OK to validate and stop the diagram template query and identifier definition.

    The SQL code is automatically reported in the Query area field from which Query/Identifier Editor has been opened.

4/26/2014