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 / Clear label after saving.
Power Apps
Answered

Clear label after saving.

(0) ShareShare
ReportReport
Posted on by 126

Hello.

 

I have a menu where the user should save the data. After that, I would like all the labels on that menu to be blank.

How can I do that?

 

If(!IsBlank(varRecord),
Notify("Your request was submitted!", NotificationType.Success),
Notify("Your request was not submitted... Please try again.", NotificationType.Error)
);

 

 

Thank you.

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

    If you are talking about a label (not a text input), then you will need to have some sort of conditional logic in the Text property:

    If(!IsBlank(varRecord), // a variable to indicate a submission has happened
     "", // An empty string to show a cleared label
     "Some text" // for when a submission has not yet happened
    )

    Hope that helps,

    Bryan

  • RL-26071304-0 Profile Picture
    126 on at

    Thank you for yor answer. 

     

    This is my code, on "ON SELECT" property:

    2022-03-29_14h06_01.png

    What I would like is after the message "Your request was submitted!", all the labels turn blank (or hidden).

     

    Thank you. 

     

  • BCLS776 Profile Picture
    8,994 Moderator on at

    OK, you can also toggle the Visible property of each label with this code:

    If(IsBlank(varRecord), true, false)

     

  • RL-26071304-0 Profile Picture
    126 on at

    It doesn't work because when I go to the previous screen and then return to this menu, those labels are empty. And they should not be...

  • BCLS776 Profile Picture
    8,994 Moderator on at

    @RLeite wrote:

    It doesn't work because when I go to the previous screen and then return to this menu, those labels are empty. And they should not be...


    OK, then we need to use a different condition than IsBlank(varRecord) to control the visibility of these labels. If the existence of the record is not the right toggle (because it resets when changing screens), does your app have another one we can use? If not, then consider creating another context variable to use on that screen for controlling the visibility of the labels.

     

  • RL-26071304-0 Profile Picture
    126 on at

    Is it possible to write some code on the "ON SELECT" property that users need to click to save?

  • RL-26071304-0 Profile Picture
    126 on at

    Is it possible to write some code on the "ON SELECT" property that users need to click to save?

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    @RLeite wrote:

    Is it possible to write some code on the "ON SELECT" property that users need to click to save?


    Here are some more detailed steps:

    1. In the same "On" property as the one that creates varRecord, place another line of code: UpdateContext({varVisible: false})
    2. In the OnVisible property of the same screen put this line of code: UpdateContext({varVisible: true})
    3. In the Visible property of each label you wish to control, put varVisible

    This will turn off the labels at the same time that varRecord is populated and they won't turn back on until you leave and then browse back to the same screen. If you need to make them visible sooner than that, you will need to add UpdateContext({varVisible: true}) to another "On" property of another control in a way that activates when you want it.

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard