Set entity field from lineitems field

Workflowtaskslineitemstoentity

workflow task editing

This workflow task allows you to apply a function on a lineitem field and assign the result to an entity field. The task is available only for inventory modules: Quotes, Sales Orders, Invoices, and so on.

The task form allows you to define a function to apply, the source lineitem field as function parameter and the target entity field to assign the result of the function.

To save the task it is required to define at least one function, one source field and one target field.

Function

The available functions are:

  • sum: calculates the sum of the values of the lineitem fields; numeric fields

  • average: calculates the average of the values of the lineitem fields; numeric fields

  • concat: creates a text content by concatenating the texts of the lineitem fields; fields of type text, html, numeric or date.

  • min: set the minimum among the values of the lineitem field; numeric or date fields

  • max: set the maximum among the values of the lineitem field; numeric or date fields

  • and: calculates the boolean AND among the values of the lineitem fields: checkbox fields

  • or: calculates the boolean OR among the values of the lineitem fields: checkbox fields

Separator

It is possible to set a separator between fields and a separator between rules, with a new line with

  • ###HTMLBR### for html text

  • ###TEXTNL### for plain text

Entity filter

The Entity filter allows you to select a filter, previously created, of the module you are assigning the task.
This filter allows you to apply further filtering, in addition to the one already available in the workflow, to filter the records on which to perform the task.

Lineitem type filter

Allows you to filter the lineitems on which to execute the task.
The filter is defined in the lineitem type module, Products / Services.
Lineitems not selected by the filter will remain unchanged.

Lineitems filter

As for Lineitem type filter, this filter also defines which lineitems the task is applied to.
The difference is that, in this case, the filter (max 3 AND conditions) works on the values of the lineitem fields.

Add new rule

Allows you to add one or more rules to create tasks for assignments to different entity fields in the same workflow task.