1

I am trying to use the ifempty attribute in a docx template to choose from 2 available variables. I do not have access to the php files. I am just a user of a system using tbs to allow custom export.

Here are the results of my tests (var.first is empty, var.second contains the word library)

[var.first;ifempty=var.second]

Result : var.second

[var.first;ifempty=[var.second]]

Result : [var.first;ifempty=library]

How do I get just the content of the second variable if the first one is empty ? I hope I am being clear. English is not my mother language...

Thanks in advance for any help you can give.

1 Answers1

0

Embedded fields are supported only in parameters file, script, if, then, else or when. See manual.

So you cannot used embedded field in parameter ifempty, but you could simply use parameter if/then/else instead :

[var.first;if '[val]'='';then [var.second]]
Skrol29
  • 5,402
  • 1
  • 20
  • 25