Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

How do I populate a word document that has conditional to show certain fields?

(0) ShareShare
ReportReport
Posted on by 494
I already know how to populate a word document template by putting plain text content control and settings its properties. 

My goal is to show certain fields in the document depending on the variable

for example

Is continue? {{continue answer}} <--- these are plain text content control that will be populated 
{{\if "continue answer" = true}} 

content 1 : {{content 1}}  <--- these are plain text content control that will be populated 
content 2: {{content 2}} 

{{\endif "continue answer"}} 

if continue answer is false the fields wouldn't show on the word document. How am I able to achieve this?
  • David_MA Profile Picture
    David_MA 9,039 on at
    How do I populate a word document that has conditional to show certain fields?
    Hello @KevinGador, this forum is for providing solutions using Power Automate. There very well may be some way to do what you want within Word itself, but I don't know how. I would suggest that you post your question in the dedicated Microsoft Word forum at Word | Microsoft Community Hub. You will be more likely to get an accurate answer there if the solution offered by @AlexEncodian​​​​​​​ does not meet your needs.
  • AlexEncodian Profile Picture
    AlexEncodian 4,325 on at
    How do I populate a word document that has conditional to show certain fields?
     
    Encodian's Populate Word Document action has powerful document generation features that can handle all your requirements and more.
     
    In your instance, you could use Conditional Expressions in the template to conditionally insert text or remove it.
  • KevinGador Profile Picture
    KevinGador 494 on at
    How do I populate a word document that has conditional to show certain fields?
    David_MA     that is definitely true however what can I do to my word template? Maybe there's something I can do in there

    I've stumbled upon mail merging or field contents which I do not know how to utilize. 

     
  • David_MA Profile Picture
    David_MA 9,039 on at
    How do I populate a word document that has conditional to show certain fields?
    The Populate Word Template is limited to populating the fields you have added to the template. It cannot add logic to the Word document.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard