docx-stamper
docx-stamper copied to clipboard
Replacing Expressions in a .docx Template but outputting Variable Value
Hi there
Apologies if this has been dealt with already but I know that it's possible to do:
${person.name.equals("Homer") ? "Duff" : "Budweiser"}
But I'm struggling to get this to work so that a value from another variable is displayed instead.
${person.surname.equals("Homer") ? ${person.favourite_drink} : "Duff"}
Any help would be appreciated.
Thanks
Pav
Try this:
${person.surname.equals("Homer") ? person.favourite_drink : "Duff"}
This is perfect. Thank you for your quick response.
Thanks again.
Pav