cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WillPage
Level 8

Resetting text input in a gallery

Hello,

 

I have a gallery that displays items from a SharePoint list. I also put a text input box into the gallery. The NextArrow onselect action in the gallery does, amongst other things, set(variable, textinput), and the hidden property of the nextarrow depends on the text input box containing a numeric >0.

 

If I input a positive number into a box, the next arrow shows, and I can click that and move on, all good. But, if I enter text into a text box, then change my mind and enter text into the text box within another item in the gallery, I'd like to reset the text box in the first item.

 

This is what I mean.. Single item with text input:

o8bebd

Now if I click in another box and enter a number, I'd like the first one (circled) to clear. Can I do that?

20ze13r

I tried using the reset function in the onselect action of the text box, but it doesn't reset the other text boxes within the gallery.

9 REPLIES 9
Administrator
Administrator

Re: Resetting text input in a gallery

adding in @anees to assist

 

@TopShelf-MSFT

WillPage
Level 8

Re: Resetting text input in a gallery

Can anyone assit with this please?

eliu
Level: Powered On

Re: Resetting text input in a gallAery

Any follow up? I am facing the same issue here as well.

eliu
Level: Powered On

Re: Resetting text input in a gallAery

This is what I did as a workaround.

 

First, use a context variable. In this example, we used "DefaultVal".

 

Under the Advance --> Data Section, there is a Reset Field for the textfield.

 

Enter: DefaultVal

 

So in my case, every time a screen reloads, it will be reset to default "0". So, to achive this, under the onVisible selection, enter this:

 

UpdateContext({DefaultVal:true});
UpdateContext({DefaultVal:false})

 

Tada!

 

The same can be applied for buttons as well.

 

 

PytByt
Level: Powered On

Re: Resetting text input in a gallery

hi @WillPage 

 

have you solved this problem?

can you share your solution here with me?

 

i have similiar problem, please help.

 

thanks,

pytbyt

Highlighted
WillPage
Level 8

Re: Resetting text input in a gallery

@PytByt I never did. That was one of my first PowerApps and I don't have access to it any more because I changed jobs.

If I had to do it again I'd probably develop another means of inputting the quantity required without putting a text input into a gallery like that.
Super User
Super User

Re: Resetting text input in a gallery

Hey @WillPage / @PytByt 

 

Can you set the gallery properties as:
 
Text Input -> Reset -> ResetGalleryText
TextInput -> OnSelect -> Select(Parent);Set(ResetGalleryText,false);Set(ResetGalleryText,true)
 
This will reset the Text Input controls as soon as the other text input is selected.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
PytByt
Level: Powered On

Re: Resetting text input in a gallery

Hi @WillPage 

 

Its a shame though good luck to you mate!

 

Hi @yashag2255 

Can i use the OnChange Property of radio control to reset the text input that inside a gallery? how?

reset.png

 

Thanks,

BR.

pytbyt

Super User
Super User

Re: Resetting text input in a gallery

Hi @PytByt 

 

Do you wish to reset the textbox in a specific item based on the radio button in that item? If so, you can use the expression on the "OnChange" property of the radio button control as:
 
OnChange -> Reset(TextInput1)
 
TextInput1 is the name of input control inside gallery item. Each radio button will change its corresponding textbox only.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
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

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

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

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