Hello everyone!
I have an Annex that I attach using @msword-pages which has two variants (Advisory Board with or without Observer Members).
I decided to upload the variants as two separate .docx files, because it was faster than writing a bunch of conditions for minor text changes.
I then use a true/false datafield to call the version with (“yes”) or without (“no”) Observer Members:
Now, I want to include the same @SNIPPET in each of the two documents, as the information is identical. When I try to include @COMPANY in both @msword-pages functions, I get a syntax error and am unable to save the clause:
The below clause should reproduce the error:
@if(#ia^has-rop-advisory, @BOARD, @empty-list)
BOARD = @if(#ia^has-rop-advisory-observers = true, @OBSERVER, @ROPA)
OBSERVER = @msword-pages(#rop-a-yes-observer-v4, @COMPANY)
ROPA = @msword-pages(#rop-a-no-observer-v4, @COMPANY)
COMPANY = @if(#company^name, #company^name, @placeholder(“●”)
Interestingly, the error even appears when calling the same @msword-pages document, not two different ones. Maybe the issue lies with @msword-pages wanting unique internal snippets within a clause?
The error persists if the two @msword-pages first call different internal snippets, but then both land on the same one:
However, using the @if function first, and then sending them to the same internal snippet does work:
I can work around this by creating two separate clauses for the two different word fragments.