Change label/field depending on a formula?

Hi,

Is it possible to change values on labels/fields depending on dynamic input?
For example, if we would like to print a PO which could be of type project or material,
can we adjust the labels on the order lines to switch from

  1. Description (if type project) or 2. Item name (if type material).

And also, if PO is of type Project we want to show fetch value from @name in the field, but if it is of type Material we want to show @ItemId. Is this possible?

Hi anna,

Iit is possible to achieve your objective by utilizing the field tagging element and Xpath function "iff()".

The following syntax can be used as an example:

iff(@type=‘Project’, @Description, @Material)

This will enable you to display the Description field when the type is “Project”, and the Material field when it is not. Please refer to the attached image for reference.

Regarding the labels, you can also use the field tagging element and Xpath function "label(). You can use the following syntax as an example:

iff(@type=‘Project’, label(@SYS121), label(@SYS1215))

Please note that this is just a sample to demonstrate the syntax, and you can modify it as per your dataset.