You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
We want to show certain text in the word document based on mail merge field conditions. Basically trying to make use of if conditional merge fields.
Let say we have different annexure documents attached with the main document. The annexures vary based on the client's terms and conditions.
For Example:
If a client's document has 2 annexures in the main document text should load with dynamic text like
This agreement contains the following annexures
Annexure A
Annexure B
If a client's document has 4 annexures in the main document text should load with dynamic text like
This agreement contains the following annexures
Annexure A
Annexure B
Annexure C
Annexure D
I am trying to add the if conditional merge field in the template as follows
======== Doc template =======
This agreement contains the following annexures
{ IF {MERGEFIELD AnnexA} - "Y" "Annexure A" ""}
{ IF {MERGEFIELD AnnexB} - "Y" "Annexure B" ""}
{ IF {MERGEFIELD AnnexC} - "Y" "Annexure C" ""}
{ IF {MERGEFIELD AnnexD} - "Y" "Annexure D" ""}
Expected Behavior
The AnnexA, AnnexB, AnnexC & AnnexD should be returned when getMergeFields() method is invoked. Instead, the method doesn't recognize if conditional mail merge fields
Please share your thoughts
The text was updated successfully, but these errors were encountered:
We are also experiencing the same issue.
The IF condition does not seem to get evaluated.
Is this feature not supported? Is there any workaround?
Please advise.
We came up with a workaround. Basically reformatted the data to handle the conditional structure outside of mail merge and then fed it into the mail merge. Within the template there will be both form field for condition A or B in the same block. If A has a value, B will not have a value in the restructured data we are feeling in.
Please let me know if you need any further information.
We want to show certain text in the word document based on mail merge field conditions. Basically trying to make use of if conditional merge fields.
Let say we have different annexure documents attached with the main document. The annexures vary based on the client's terms and conditions.
For Example:
If a client's document has 2 annexures in the main document text should load with dynamic text like
This agreement contains the following annexures
Annexure A
Annexure B
If a client's document has 4 annexures in the main document text should load with dynamic text like
This agreement contains the following annexures
Annexure A
Annexure B
Annexure C
Annexure D
I am trying to add the if conditional merge field in the template as follows
======== Doc template =======
Expected Behavior
The AnnexA, AnnexB, AnnexC & AnnexD should be returned when getMergeFields() method is invoked. Instead, the method doesn't recognize if conditional mail merge fields
Please share your thoughts
The text was updated successfully, but these errors were encountered: