web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : O1T5OY0WUHhbYlhV+qV0au
Power Apps - Building Power Apps
Answered

Unable to reset controls

Like (0) ShareShare
ReportReport
Posted on 26 Dec 2020 14:03:58 by 1,118

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.

I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on 26 Dec 2020 at 15:57:36
    Re: Unable to reset controls

    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,118 on 26 Dec 2020 at 16:09:23
    Re: Unable to reset controls

    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 26 Dec 2020 at 19:03:57
    Re: Unable to reset controls

    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,118 on 27 Dec 2020 at 03:18:16
    Re: Unable to reset controls

    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
    151,631 Most Valuable Professional on 29 Dec 2020 at 00:13:15
    Re: Unable to reset controls

    @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
    151,631 Most Valuable Professional on 01 Jan 2021 at 02:01:54
    Re: Unable to reset controls

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 686 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 433 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 266 Moderator

Last 30 days Overall leaderboard