cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdelacrettaz Advocate I
Advocate I

Empty a textbox when sectioning a new item in a browsegallery

In the first image that is seen is an edit of the article browsgallery:

Sin título1.png

Sin título.png

inside the same I have a textbox in which I enter the amount, when it is saved, does a navigate and returns where all the articles are, when I select another article for Add the textbox that you enter the amount is saved with the last number you enter for Example: "2". What I want to do is that when I add an article and I want to return to add another article the texbox is blank

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
MelindaK Skilled Sharer
Skilled Sharer

Re: Empty a textbox when sectioning a new item in a browsegallery

Hi,

 

One way I have achieved something similar was to make use of context variables. 

So on the OnSelect function in the gallery, in the Navigate function you will set a variable, which will then be used on the Default of the TextInput control.

 

The OnSelect function will be something like this:

OnSelect = Navigate(Screen2, Transitions.None, {default: ""})

-where default is the variable that will be used on the second screen TextInput control

 

Then on the second screen on the Default function of the TextBox you will have

Default = default

 

Or another way is to use the OnVisible function on the screen itself to set the variable value using UpdateContext function:

UpdateContext({default: ""})

Then again uses the 'default' variable on the Default function of the TextInput.

 

Hope this helps 🙂 

 

MelindaK

View solution in original post

1 REPLY 1
Highlighted
MelindaK Skilled Sharer
Skilled Sharer

Re: Empty a textbox when sectioning a new item in a browsegallery

Hi,

 

One way I have achieved something similar was to make use of context variables. 

So on the OnSelect function in the gallery, in the Navigate function you will set a variable, which will then be used on the Default of the TextInput control.

 

The OnSelect function will be something like this:

OnSelect = Navigate(Screen2, Transitions.None, {default: ""})

-where default is the variable that will be used on the second screen TextInput control

 

Then on the second screen on the Default function of the TextBox you will have

Default = default

 

Or another way is to use the OnVisible function on the screen itself to set the variable value using UpdateContext function:

UpdateContext({default: ""})

Then again uses the 'default' variable on the Default function of the TextInput.

 

Hope this helps 🙂 

 

MelindaK

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,344)