web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using "If" expressions...
Power Automate
Answered

Using "If" expressions when populating a Word template

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I have a flow that populates a Microsoft Word template. I'm trying to create a conditional step where certain phrasing is used depending on the amount of money being donated.

 

<100 would be blank

100 to less than 1,000 would say "generous"

1,000 or greater would say "very generous"


Then I would need that phrasing to populate into the Word template. Is this possible? Would I define this in a "Compose" step? I'd love to see a sample of how to write the expression if anyone knows how.

Thanks!

Categories:
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @gowiththeflow57 ,

     

    You can do it with two if().

     

     

    @{if(and(greaterOrEquals(variables('A'), 100),less(variables('A'),1000)),'generous','')}@{if(greater(variables('A'),1000),'very generous','')}

     

    vdezhilimsft_0-1670898253275.png

     

    vdezhilimsft_1-1670898253276.png

     

     

    Best Regards,

    Dezhi

  • gowiththeflow57 Profile Picture
    4 on at

    Ah, that worked! Thank you so much. 

     

    In case anyone else is attempting this, I did have to add one more intermediate step since my data was coming in via a connector to another service, and I needed it to read the donation amount from that. The step I searched for was "Set variable" (image below). With it, I was able to get the data to populate perfectly.

     

    gowiththeflow57_0-1670973309644.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 231 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 170

Last 30 days Overall leaderboard