Is it possible to use an 'if then else' expression in word / pdf templates? - Forum - Rollbase - Progress Community

Is it possible to use an 'if then else' expression in word / pdf templates?

 Forum

Is it possible to use an 'if then else' expression in word / pdf templates?

This question is answered

I like to know whether it's possible to use 'if then else' expressions in the word / pdf templates next to the RB field names.
This to achieve conditional showing of template fields.

Right now the only thing I can think of is to create formula fields in Rollbase, but I might even want to influence whether field sections / headers are shown in my PDF / Word output and not sure if would be able to achieve it that way.

Verified Answer
  • I tested this using the { IF "expression1" = "expression2" "true" "false" } construction which is available in Word template mergeField functionality. For instructions, please see:

    https://www.youtube.com/watch?v=DsNKT-Exj5g

    As expression1 I used a Rollbase token. When I open the created document (created by a trigger) I see my IF function with the values as expected.

    As soon as I print this document, the actual values (in this case "true") is printed.

All Replies
  • I tested this using the { IF "expression1" = "expression2" "true" "false" } construction which is available in Word template mergeField functionality. For instructions, please see:

    https://www.youtube.com/watch?v=DsNKT-Exj5g

    As expression1 I used a Rollbase token. When I open the created document (created by a trigger) I see my IF function with the values as expected.

    As soon as I print this document, the actual values (in this case "true") is printed.