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 / How do I populate row(...
Power Automate
Unanswered

How do I populate row(s) for a Word template only if a SharePoint List column is not empty?

(0) ShareShare
ReportReport
Posted on by 7

I am populating a Word Template based on a SharePoint List. I need to also add rows to a table in the same Word doc template, but only if a specified column has data. If there is no data in the column, I do not want it to add a row or any text.

 

I have tried to use the repeating content controls and write an expression, but I keep getting a errors. I have looked all over the internet, and cannot find a way to do this. I am fairly new at creating flows any help would be appreciated.

 

Xtina_0-1676348191906.png

 

Categories:
I have the same question (0)
  • v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @Xtina ,

    Please try:

    if(empty(item()?['columnName']) ,'',item()?['columnName'])

    When populating a Word template, you can use conditional expressions to insert rows only if the column is not empty.

    For example, in a Word template, you can use the conditional expression:

    if(empty(item()?['columnName']) ,'',item()?['columnName']), which will check if the column "Column1" is is empty, inserts the value of that column if not empty, otherwise inserts an empty string.

     

    Best Regards

    Cheng Feng

     

  • Xtina Profile Picture
    7 on at

    Hi @v-chengfen-msft - this is close, but it still creates an unwanted row in the Word document when the SharePoint column is blank. How would I get around that? I want it to add a row when there is data in a column, but ignore the column when there is no data. 

    Xtina_1-1676354706023.png



  • v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Ηi @Xtina,

    Unfortunately,

    [Populate a Microsoft Word template] just fills in the data on your pre-set template, and there is no way to modify the template.

    The most that can be done is to judge it as empty and fill in the empty value.

     

    Best Regards

    Cheng Feng

  • Xtina Profile Picture
    7 on at

    @v-chengfen-msft - Do you know if there are other actions that can be implement in the flow to get my desired output?

    Thanks for your help. 

  • v-chengfen-msft Profile Picture
    Microsoft Employee on at

    HI @Xtina ,

    I'm afraid it is not available for now. But you can create a new idea through the below URL, then ask  your colleagues to raise up the votes

     

    Power Automate · Community 

     

    The  product team has direct visibility of these ideas and they will implement it on the basis of the highest number of votes received. 

     

     

    Best Regards, 

    ChengFeng

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 471

#2
11manish Profile Picture

11manish 246

#3
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

Last 30 days Overall leaderboard