5.12.1.5.  default

Default value (empty by default)

In the case of

With square brackets "[ ]", VBS expressions can be stored here, which can perform more complex calculations in the background to calculate a default value.

Examples:

  • Execute the function 'funktionsname' from the VBS/VBB module 'modulname' and transfer the 2 parameters param1 and param2. The module must be loaded beforehand (via the [LOAD] section or scripts/<appname>/autoexec. The parameters are separated with <#> instead of <,> to avoid problems with the SEPARATOR.

    [modulname.funktionsname(param1#param2)] 
    
  • Return of the current date in the format year, month, day

    [CreateObject("cnstools.datetime").Format("yyyyMMdd")] 
    
  • Return of the classified value of the order number

    • For 3Dfindit:

      [erpcustom.GetClassificationProperty(table#"cns"#"CNSERPBASE"#"CNSORDERNO")]

      Specifically:

      ABC=ABC,ABC:,1,1,[erpcustom.GetClassificationProperty(table#"cns"#"CNSERPBASE"#
       "CNSORDERNO")],1,1,,,.*,
    • For PARTdataManager:

      [erpcustom.GetClassificationProperty("cns"#"CNSERPBASE"#"CNSORDERNO")]

      Specifically:

      ABC=ABC,ABC:,1,1,[erpcustom.GetClassificationProperty("cns"#"CNSERPBASE"#
       "CNSORDERNO")],1,1,,,.*,

    Return of the classified value of the weight

    [erpcustom.GetClassificationProperty("cns"#"CNSPHYPROP"#"CNSMASSEXACT")]
    • For 3Dfindit:

      [erpcustom.GetClassificationProperty(table#"cns"#"CNSPHYPROP"#"CNSMASSEXACT")]
    • For PARTdataManager:

      [erpcustom.GetClassificationProperty("cns"#"CNSPHYPROP"#"CNSMASSEXACT")]

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

    • table: The currently opened table (Application.ViewTable.Table)

    • document: The current document (Application.ActiveDocument)

    • prjPath: The path to the currently open project

You can find an example of this at Section 5.12.1.5.1, “SAP / ERP investment dialog - GET function for classification values ”.