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 / flow linked to sharepo...
Power Automate
Answered

flow linked to sharepoint list - anyway to suppress empty fields in output ?

(0) ShareShare
ReportReport
Posted on by 148

Just needing some advice or guidance.

Essentially when a new record is added to a sharepoint list from an app, i want the output to be emailed via pdf to the  individual entering the record.

While i can get this working via a simple html to pdf flow, i was wondering if there was a way to suppress/hide fields (and associated headings) that have null values?

For example in simple HTML below if there were no actual comments in fields Comment 1 and 2 below, could these fields and headings be suppressed in the output? (so the output has no gaps, less white space)  Are there other options apart from HTML?

cheezy_0-1646974235030.png

 

thanks

 

Categories:
I have the same question (0)
  • Verified answer
    Mister_Shaik Profile Picture
    1,008 on at

    Hi @cheezy ,

     

    You can add an if condition with an empty check to achieve your goal,

     

     

    if(
     empty(triggerOutputs()?['body/value/Comments1']),
     '',
     concat(
     '<br><br>Comments 1: ',
     triggerOutputs()?['body/value/Comments1'],
     '<br><br>'
     )
    )

     

     

    You can replace the "Comments1" field name with your actual field name. This will check if the given field is empty, if it's empty then just return an empty string, else return the HTML code that you want.

     

    Hope this helps 🙂


    Kind Regards,

    Shaik Sha
    ________________________________________________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • cheezy Profile Picture
    148 on at

    thanks for your help Shaik - this works - just had to modify to below (remove the 'value' from body/value/Comments1)

     

    if(
     empty(triggerOutputs()?['body/Comments1']),
     '',
     concat(
     '<br><br>Comments 1: ',
     triggerOutputs()?['body/Comments1'],
     '<br><br>'
     )
    )

      

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard