Suppress line in Word if Calculated Field is empty

Hi!

I’m new to Woodpecker, and still figuring things out. I understand how to create calculated fields that only display if the condition is met. But I have not figured out how to insert the calculated field into Word so that it appears on its own line, but if the field is empty I don’t want the line to appear in the Word document.

Any tips or advice are appreciated!

Hi, trubane -

The trick is to merge that field with the previous sentence/ paragraph you have in the document using an additional, conditional sentence. This way, either the previous sentence/paragraph will be inserted or both. Technically we leave out the option of inserting an empty placeholder.

Please see how it looks like in a template, and I also described the steps below:

Conditional sentence

1)Let’s say you have trigger question: “Should second paragraph be inserted?” with an option of Y/N

2)If you answer “YES,” you would have the new field displayed to add your text.

3)Instead of inserting this field, create a new conditional field:

First condition:
IF the second paragraph is equal to YES
THEN
“This is the first paragraph.
{Conditional Sentence}”

Note: “{ }” around the field name is a Macro which refers to the field we created previously

Second condition:
IF the second paragraph is equal to NO
THEN
“This is the first paragraph.”

Does this make sense? Feel free to reach out to me directly at eszter@woodpeckerweb.com if you need more assistance, happy to help :slight_smile:

I also attached the sample template for review.
Conditional sentence.docx (20.2 KB)

1 Like

Yes, that makes perfect sense! Thank you.