Database
By choosing to define a "dynamic menu " based on an OLEDB or ODBC database. For your information, sample syntaxes are provided.
|
Base Type |
Syntax Examples |
|
|
|
Enter the connection string, for example:
DRIVER={SQL Server};server=AXRD-myPDMtools\PDM;uid=sa;pwd=axcdazerty;database=myPDMtools_2015;
Click on the
to create drop-down menus.
For each drop-down menu, enter the name of the property to be created and click on
to specify the SQL query to be executed.
Use the text "VAL" followed by the menu number to use the value from a previous menu.
Here is the result displayed in the PropertyManager. The user selects the first property, "AX_MyCAD_Niv1_SQL," from the list; then, based on the SQL table, the other properties are populated automatically:
Examples of possible queries:
Case with 2 drop-down lists displaying families and subfamilies.
- Query for families: select distinct FAMILY from DynamicList_SQL
- Query for subfamilies: select SUBFAMILY from DynamicList_SQL where FAMILY='VAL1'
- Query for the list: select distinct SUB_FAMILY_2 from DynamicList_SQL where FAMILY='VAL1' and SUB_FAMILY='VAL2'
Case with 4 lists.
- Query for families: select distinct FAMILY from FAMILY_TABLE
- Query for subfamilies: SELECT DISTINCT SUBFAMILY FROM FAMILY_TABLE WHERE FAMILY='VAL1'
- Query for the list: select distinct SUB_FAMILY_2 from FAMILY_TABLE where FAMILY='VAL1' and SUB_FAMILY='VAL2'
- Query for the list: select distinct SUB_FAMILY_3 from FAMILY_TABLE where FAMILY='VAL1' and SUB_FAMILY='VAL2' and SUB_FAMILY_2='VAL3'

