I'm using openTBS to make some docx, with data from a intranet system.
I'm wondering if it's possible to have openTBS doing a conditional statement so it return one of two fields, depending on value of a third field?
Let's say I have country field named r20e, if that contains the value "DK" I would like it to return the field r19a. If the country field is anything but DK, I would like it to return the field r47b.
So something like this:
[onshow.r20e;if val[]== “DK”; then [onshow.r19a]; else [onshow.r47b]]
Is that possible and if so how?
It is possible, you’re not far from the solution :
[onshow.r20e;if '[val]'=='DK'; then [var.r19a]; else [var.r47b]]
[val] is a field that represents the value of the current field. It is better to quote it ('[val]'
) in order to protected the value.
[var] fields are for embedded fields.