I'm trying to populate conditional dynamic data in my docX. I have regular data populating fine, but I can't seem to find the correct syntax for conditional statements. Here's what I have so far that keeps evaluating to false:{if "<<${doc.center.subjectType}>>" = "Individual" "Is Individual" "Not Individual"}
Anyone know what's going wrong here? or where I can find documentation on this?
Thank you
Discussion posts and replies are publicly visible
I usually try to avoid putting the if/else logic inside the word document. I simply have a placeholder and manage the condition in the expression that generates the XML.
If/else-conditions in .docx templates:
Syntax
The syntax needed is pretty simple:
{if”<>”=”XY” “Content if condition is fulfilled” “Content if condition is not fulfilled”}
while the yellow part marks the condition, the green part marks the content that will be printed if the conditions is fulfilled and the red part marks the content that is printed if the condition is not met.Link for your reference: https://support.mscrm-addons.com/knowledgebase/if-else-conditions-in-docx-templates/