By choosing to define a Dynamic menu'' based on a database type OLEDB or ODBC. Syntax examples are provided for your information.


Base type

Syntax examples

 

Enter the connection string, e.g. :

DRIVER={SQL Server};server=AXRD-myPDMtools;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.


 


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

This 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 filled in automatically:


 


Examples of possible queries :

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

  • Request for families : select distinct FAMILY from DynamicList_SQL
  • Query for subfamilies : select SUB_FAMILY from DynamicList_SQL where FAMILY='VAL1'
  • List query : select distinct SOUS_FAMILLE_2 from DynamicList_SQL where FAMILLE='VAL1' and SOUS_FAMILLE='VAL2'

Case with 4 lists.

  • Request for families : select distinct FAMILY from TABLE_FAMILY
  • Query for subfamilies : select distinct SUB_FAMILY from TABLE_FAMILY where FAMILY='VAL1'
  • List query : select distinct SOUS_FAMILLE_2 from TABLE_FAMILLE where FAMILLE='VAL1' and SOUS_FAMILLE='VAL2'
  • List query : select distinct SOUS_FAMILLE_3 from TABLE_FAMILLE where FAMILLE='VAL1' and SOUS_FAMILLE='VAL2' and SOUS_FAMILLE_2='VAL3'