Documentation Index

Fetch the complete documentation index at: https://docs.staedean.com/llms.txt

Use this file to discover all available pages before exploring further.

Set up calculated fields for data entry workflow template

Prev Next

For a data entry workflow template, you can mark a field as a calculated field. The value of a calculated field is derived from a calculation expression, using variables that are mapped to other fields in the template.

Note

A calculated field is always shown as read-only on the related data entry workflow tasks.

Steps

  1. Go to Data entry workflow > Design > Data entry workflow templates.

  2. In the list, click the link of the desired data entry workflow template.

  3. Click Edit.

  4. In the Steps section, in the tree, select the desired field group.

  5. On the Fields tab, you can mark a field as a calculated field.

    In the grid, select the Calculated field check box.

    Note

    If you clear the Calculated field check box, the calculation setup for the field is disabled.

  6. Sub-task: Set up variables.

    1. To open the calculation expression setup, click Calculation.

    2. In the Variables section, click New.

    3. In the Name field, enter a short variable name.

    4. Define which field value must be used for the variable.

      In the Record field field, select the desired field.

    5. You can indicate how the variable value must be handled in the expression, regardless of the document record field type. Usually, the default variable type is used.
      The Variable type field, select an option.

    6. You can define the language in which the variable is expressed.

      In the Language field, you can select a language.

    7. Repeat these steps for each variable that you want to use in the expression.

  7. Define the calculation expression.

    In the Expression field, define the expression, using variables. For more information on defining an expression, see Expressions.

  8. Sub-task: Test expression.

    1. Click Test expression.

    2. Define test values for each variable.
      On the Test expression page, in the Variables section, in the Value field, enter a test value.

      Note

      Usually, you use the default Variable type and Language as defined in the calculation setup.

    3. Click Execute.

    4. In the Result section, review the test result.

    5. Close the page.

  9. Close the page.

Expressions

In the calculation expression, you can use:

  • Variables: Add a defined variable by entering the variable Name.

  • Arithmetic operators: +, -, *, /

  • String functions like TRIM and SUBSTRING

  • Fixed values: You can enter a fixed value between single quotation marks. Example: ‘-’.

For more information on expressions, see Expressions.

Expression examples:

Example 1:

Combine the product name and product description in one target field, divided by a hyphen.

Variables:

  • a - Product name

  • b - Product description

Expression: a+’-’+b

Example 2:

To add the packaging weight to a target field, you can subtract the net weight from the gross weight.

Variables:

  • nw - Net weight

  • gw - Gross weight

Expression: gw-nw

Example 3:

You want to remove all leading and trailing blank characters from customer names in D365 F&SCM.

Variable: c - Customer

Expression: TRIM(c)