cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Billy1988
Level: Power Up

Reset function and variable in text field

Hello together,

actually i have two easy questions. Easy for you, but unfortunately not for me ;-)

1.) I would like to reset a label with the name test. If i want to reset a text field then i just do this: Reset(test)
but for a label it doesnt works?

2.) I have a text field "test" and i want to fill it with a variable. I do this: test.text =  myvariable
but it doesnt works?

Thank you for the help

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Reset function and variable in text field

Hi @Billy1988 

Any text field that is displaying the content of the variable "myvariable" will continue to show whatever value is stored in this even if you reset the control. By updating the variable "myvariable" to a blank string this will effectively remove the default value.

 

As an aside, if you want to Reset multiple controls at once you can use a true/false variable in the Reset property of the control. Then simply "toggle" the variable on and off to trigger the reset. Details on how to achieve this can be found at https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-reset

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


4 REPLIES 4
Highlighted
Super User
Super User

Re: Reset function and variable in text field

Hi @Billy1988 

Im not sure you can Reset a label control. From my understanding, the Reset function is primarily for input controls.

With regards to filling the Text field "test", if this is a Text Input simply change the Default property of this control to be "myvariable" (if this is a Label control then set the Text property to "myvariable"). You cannot directly set properties of the controls at runtime but you can update the variables that they refer to.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Billy1988
Level: Power Up

Re: Reset function and variable in text field

Hi @LeeHarris 

thank you for the reply,

"Im not sure you can Reset a label control. From my understanding, the Reset function is primarily for input controls."
Ok, thank you for the information.

I could change the Default property from the text field but i want to reset all the text fields,
if i change the screen.

With the other text fields without Default property it works!!
Just Reset(test1);;Reset(test2);;Reset(test3)

The text field test4 has a default property and it doesnt works
I close the Screen and open again.... all the other fields are clear except field test4 :-(

What can i do?

Thank you again


Super User
Super User

Re: Reset function and variable in text field

Hi @Billy1988 

Any text field that is displaying the content of the variable "myvariable" will continue to show whatever value is stored in this even if you reset the control. By updating the variable "myvariable" to a blank string this will effectively remove the default value.

 

As an aside, if you want to Reset multiple controls at once you can use a true/false variable in the Reset property of the control. Then simply "toggle" the variable on and off to trigger the reset. Details on how to achieve this can be found at https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-reset

 

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Billy1988
Level: Power Up

Re: Reset function and variable in text field

Hi@LeeHarris 

Thank you very much. I will try to do this..


Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 412 members 4,739 guests
Please welcome our newest community members: