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 Apps / What is the best way t...
Power Apps
Answered

What is the best way to set a minimum height on a label when the referenced data card control is blank?

(0) ShareShare
ReportReport
Posted on by 831 Moderator

I have a data card with a multi-line text field. I then have a label on the right side of the screen that is blank. When text is entered in the text field that same text is added to the label. I have the label set to auto height. This works perfect as long as there is text in the text field. If there is no text, then the label collapses as seen below (the pink stripe).

futr_vision_0-1704202410449.png

 

What would be the best way to set a minimum height for this label? I've read of one solution where I use two labels. One has autoheight on and the other doesn't. The solution is to toggle between the two based on whether there is text in the text field or not. This doesn't seem too elegant but should work. I'm looking for something a little simpler. I had considered just adding placeholder text to the text field but as soon as that is deleted then my label is going to collapse. Any suggestions how to best handle this?

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Since you are using AutoHeight, a simple way to solve this is to make sure there is always something in the label. In its Text property you could use:

    Coalesce(ThisItem.'Campaign Notes', " ") // replace ThisItem.'Campaign Notes' with your desired text

    This will force a single space character into the label whenever there is no existing text

     

    Hope that helps,

    Bryan

  • futr_vision Profile Picture
    831 Moderator on at

    Perfect. Just the simple answer I was looking for. Thanks

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard