By choosing to define a  Dynamic menu'' based on a  database   type  OLEDB or ODBC. For information, examples of syntaxes are proposed.


Type of base

Examples of syntax

 

Enter the connection string, example :

DRIVER={SQL Server};server=AXRD-myPDMtools;uid=sa;pwd=axcdazerty;database=myPDMtools_2015;

Click on the button   to create drop-down menus.

For each drop-down menu, enter the name of the property to be created and click on    in order to fill in the SQL query to be executed.


 


We use the text ''.VAL'' followed by the menu number to use the value of a previous menu.

Here is the result obtained in the PropertyManager. The user selects the first property in the list  AX_MyCAD_Niv1_SQLThen, depending on the SQL table, the other properties are automatically filled in:


 


Examples of possible queries :

Case with 2 drop-down lists displaying families and sub-families.

  • Request 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 SUBFAMILY_2 from DynamicList_SQL where FAMILY='VAL1' and SUBFAMILY='VAL2

Case with 4 lists.

  • Request for families: select distinct FAMILY from TABLE_FAMILY
  • Query for subfamilies: select distinct SUBFAMILY from TABLE_FAMILY where FAMILY='VAL1'.
  • Query for the list: select distinct SUBFAMILY_2 from TABLE_FAMILY where FAMILY='VAL1' and SUBFAMILY='VAL2
  • Query for the list: select distinct SOUS_FAMILY_3 from TABLE_FAMILY where FAMILY='VAL1' and SOUS_FAMILY='VAL2' and SOUS_FAMILY_2='VAL3'