5.12.1.8.2. Fill list field via VBS expression

In addition to a CFG file, you can also use square brackets "[ ]" VBS expressions, which fill the list field with values.

Examples:

  • PARTdataManager:

    [modulname.funktionsname(comboBox#erpdata)] 
    comboBox.Items.Add("Wert1") 
    comboBox.Items.Add("Wert2")
  • 3Dfindit:

    [modulname.funktionsname(values)]
    values.Add("Übersetzung1") 
    values.Add("Wert1") 
    values.Add("Übersetzung2") 
    values.Add("Wert2")

In this context, the following variables can also be passed to the function:

  • comboBox: The object of the ComboBox to make direct adjustments to it

  • erpdata: The internal ErpData object for data record creation (here you can get the current table via erpdata.Table, for example)

  • userField: The configuration of the field

  • values (3Dfindit only): Array with the values, always as a pair of two of the displayed value and the actual value