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 / Text label retain valu...
Power Apps
Answered

Text label retain value in edit mode and still be editable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, I have a label and the text property is set to, ListBox1.Selected.Result, which works fine but when I use the app and go to edit mode the label is blank again 

 

I have tried, a version of a formula I am using for my dropdowns in the dropdown "default" property, but labels do not have a defualt property. 

 

If(EditForm1.Mode = FormMode.Edit, ThisItem.'Maintenance Asset Description'.Value, ListBox1.Selected.Result)

 

This formula in the text property does retain the value but now the label does not change when a new item is selected from the list. 

 

any help appreciated!

 

 

Categories:
  • Verified answer
    leyburn19 Profile Picture
    2,157 on at

    Is the label inside the datacard for the List Box?  What is the default for the List Box?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @leyburn19  

     

    yes they are inside the same data card, I think I am following your logic, set the default up for the list box and keep the test property on the label as listbox1.selected.result ?

  • leyburn19 Profile Picture
    2,157 on at

    That's how I do it with controls added to a data card.  In regards to the List Box,  I make the Default what I want it to be if the default is blanks still.

     

    If(Isblank(Parent.Default),"Defaulttextinlist",Parent.Default)

     

    I do not use a label though,  I use the actual Datacard Field and it is set to the value of the selected item.  I make this invisible to user

     

    This means that is a user goes to edit mode it gets the value of teh saved data if there is some or a value based on a default

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @leyburn19 

    yeah this work perfectly, I just added the formula below to my list box default property

     

    If(EditForm1.Mode = FormMode.Edit, ThisItem.'Maintenance Asset Description'.Value, " ")

     

    and kept my label's text property set to 

     

    listbox1.selected.result 

     

    I was using a dropdown but switched to a label and a list box to have the text wrapping 🙂

     

     

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 Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard