Attributes for Where Conditions - Intergraph Smart Materials - Version 10.1 - Administration & Configuration - Hexagon

Intergraph Smart Materials Classic Administration (10.1)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Administration & Configuration
Smart Materials/Smart Reference Data Version
10.1

If you want to define attribute based where conditions, you first need to create attributes on the A.60.07 Attributes for Where Conditions screen. This is a prerequisite for working with the A.60.06 screen and attribute based where conditions, because you define selection criteria based on these attributes.

In order to set up proper attribute definitions, an in-depth knowledge of internal data structures and SQL processing is required. This task should not be considered a task that can easily be performed by any user.

The attributes used in the where condition are not the base table attribute definitions that appear in the Smart Materials core database. Instead, they are aliases. In this way, engineers may use the more easily identified aliases defined by the database administrator rather than having to know the core database table/attribute structure. The idea is to avoid data errors due to possibly different interpretations of the base structure. The aliases are called ‘Attributes for Where Conditions’ and the more common ones are delivered by default.

Setting up attributes involves the following steps:

You must assign a unique name and a module reference to the attribute definition. You then have to decide which base table the attribute is taken from. You may enter the table name manually or pick it from a list of values. The next step is to specify the column of the table. Again, you may pick it from a list of values.

Furthermore, you must know how the table you choose relates to tables M_IDENTS, M_LIST_NODES, M_LIST_POS, and M_REQ_LINE_ITEMS. Each attribute must be joined to at least one of these tables. If there is a direct relationship, you may enter the name of the join column or AUTO. Otherwise, if no direct relationships exist, you can specify the use of a specific intersection table to create the join.

Use the AUTO option carefully; it will always be displayed in the list of values, but the program that creates the view definition on A.60.06 may be unable to find a join column. You should check the SQL command text of the generated view for such an error; if it goes undetected, it will result in an unwanted cross join and thus in a wrong result set (A cross or bulk join creates the Cartesian product of all rows in all associated tables).

Additionally, you may specify a user-defined where condition to further restrict the attribute. If you want to refer to the base table of the attribute in this condition, use the prefix "BASE_TABLE".

The example displayed in the picture above shows the definition of the attribute PAINT_SYS. By means of this attribute, a where condition/view will be created that limits the list positions on the BOM to those with a specific value assigned to column attr_value of table m_list_pos_values for the list position attribute PAINT_SYS.

The unique name of the attribute is entered in the Attribute Code field. This name will be displayed in the LOV for the Attribute field on A.60.06. With the Table and Column fields, you define where this attribute will fetch its value. Both fields provide lists of values.

With the next fields, you define whether and how this attribute is joined with the tables M_IDENTS, M_LIST_NODES, M_LIST_POS, and M_REQ_LINE_ITEMS.

For tables with a direct relationship, you can use the via column fields to join the table entered in the Table field with the corresponding table M_IDENTS, M_LIST_NODES, M_LIST_POS, or M_REQ_LINE_ITEMS. Use the LOV to select the column; only columns that have the same name in both tables are listed. Select AUTO if the software should retrieve the join columns automatically.

For tables with no direct relationships, you can use the intersection table field to select an intersection table to join the table entered in the Table field with the corresponding table M_IDENTS, M_LIST_NODES, M_LIST_POS, or M_REQ_LINE_ITEMS. The list of values is determined using the internal data structure.

To specify a user-defined where condition to further restrict the attribute, you can use the Additional WHERE-Condition field. Please refer to the table of the attribute using the prefix BASE_TABLE. In the example in the picture above, the additional where condition refers to the table M_LIST_POS_VALUES, which is assigned to the attribute in the Table field.

In the List of Value Command field, you can define an optional LOV command that you can use on A.60.06 for the attribute value. The statement entered here must be a valid SQL statement. The SQL statement must have TWO columns in the Select list. When you insert an invalid statement, message MAR-10661 appears (Not a valid SQL statement) and in the status line the exact Oracle error is visible.

To assign the attribute to specific modules, click the Go to Next Block button to open Window 2.

Select the modules to be assigned from the LOV and save the changes. Close the window to go back to the main window.

The project default ZX_AQC_MOD can be used to limit the list of values in the Attribute field on A.60.06. If this project default is set to Y, only the attributes that are explicitly assigned to the same module are available (like the where condition described above). If this project default is set to N (default), all where condition attributes are always available.