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 / Unable to reset controls
Power Apps
Answered

Unable to reset controls

(0) ShareShare
ReportReport
Posted on by 1,119

Hello

I am trying to reset the Disabled Text Controls when i navigate between Screens. But they are not seems to be working. Not sure where i am doing wrong. Please assist. Posting screenshots.

 

Text box control to Input the Employee ID.

User clicks on Get Details Button

Now the Details of employee like, Name, Phone number are populated in text boxes. (Disabled as user should not edit)

User input additional details of employee, like last working and Reason for resignation

User click on Update Button. Details will be updated into SharePoint List.

 

Now when i naviagate between the Screen, the value showed on Text controls with employee details stays ever.

DefaultText.png
Screenshot from 2020-12-26 19-29-45.png
resettext.png
Categories:
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    You can't directly set the value of a control from a button. The value of a text control is determined by the formula in the Default property.  In your case it is FrmEmp.Name, so if that property still contains the Name it will continue to be displayed when you reset the control. If you are using a form then when you save the data to SharePoint try resetting the form ResetForm( FrmEmp).

  • venka91 Profile Picture
    1,119 on at

    You got my point right . But I am not using form to store the data to share point . 

    the button just get the basic info of employee and displays it . Additional input given in control and will be appended to share point list for the selected record .

     

    so is there no way to reset these values or any other way you could suggest to get the same requirement achieved ? 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @venka91 

    Set the default mode of the form to View.  This will prevent editing of the cards.  For the controls you want to be able to set to blank,  set the display mode of the card to Edit and put 

    If(!IsBlank(Parent.Default),"") as the default property of the control inside the card.
  • venka91 Profile Picture
    1,119 on at

    But I am not using forms . I am using custom controls for all values to be displayed from data source .

     

    i only have the problem resetting these custom control text box as the record I pulled using look up function will be displayed as text . So I want to make the lookup value blank navigate between screen so the text box controls will not display the values and shows empty.

  • Verified answer
    WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    @venka91 ,

    I will have a go at this one for you and understand you are using "unbound" text boxes (not in a Form).

    As @Jeff_Thorpe noted, you need a "stored" value to set as the Default of the control.

    You can also control the ability to edit the Text Box (as @Drrickryp noted)  in its DisplayMode (which can be Edit, View or Disabled) - either of the last to are what you need to prevent editing - they just display differently.

    So firstly, if you are selecting the record from a LookUp, you can set a Variable to the (entire) record contents

    Set(
     varRecord
     YourLookUpCode
    )

    The Default of your text boxes would then be (example for Name)

    varRecord.Name

    So taking this further, if you set another Variable when you want to "clear" the contents.

    Set(varClear,true)

    you can then conditionally set the contents in the Default

    If(
     varClear,
     "",
     varRecord.Name
    )

    Is this what you are asking?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @venka91 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard