cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Using buttons to input in a text field

I have a text field to fill in an number, but I don't want to use the onscreen keyboard or keyboard attached to the device for it.

Instead I want to create buttons ranging from 0-9, so you can fill in the number by pressing those buttons.


For example, press the 1 and 0 button to put the number 10 in the text field.
So basicly, I want to create an onscreen numpad in the app itself.

 

Now I found this: https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-update-text-input-field-with-butto...

This is part of what I want, but doesn't put two number together, so that's not working really as I want it.

 

So, what should I use instead to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@alexanderb1 

 

My apologies.  I guess I did not fully read/understand what you were trying to accomplish.  I've made updates to the sample file.  Please see if this is more in line with your needs.

 

I'm pulling in the numbers as you type them into a collection, then using the collection to populate the text input box.  The "C" button will clear the collection.  The enter button is not programmed do to anything at the moment.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

@alexanderb1 

This feature does not currently exist in PowerApps.  You can go vote for the feature using the link below and if it gets enough votes Microsoft will include it in a future release of PowerApps.

 

Link to Ideas Forum

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Process-Action-or-Button-by-KeyPress-event/idi-...

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

@alexanderb1

 

I believe I was able to accomplish what you are trying to do using a global variable.

 

App.Onstart = Set(varinput, "")

 

On Screen1 I created a text input and set:

TextInput1.Default = varinput

 

I then created  5 buttons and set the OnSelect property to: Set(varinput, "1") (increasing the number for each button)

 

I have attached the sample file I created.  Hopefully, this will work for you.

 

 

Highlighted

@mdevaney 

 

Thanks, but the topic you linked doesn't really seem to be the function I want.

 

@er229242 

 

Thanks, but it doesn't do it entirly.

 

When you press for example the button 1 twice, you still have only the number 1 in the text field.

What I want, is that it put all the numbers after each other in the input text field. 

 

So for example:

Pressing 1 twice, will give '11'

Pressing 1 and than 2 will give '12'

Pressing 3 and than 5 will give '35'

etc.

Highlighted

@alexanderb1 

 

My apologies.  I guess I did not fully read/understand what you were trying to accomplish.  I've made updates to the sample file.  Please see if this is more in line with your needs.

 

I'm pulling in the numbers as you type them into a collection, then using the collection to populate the text input box.  The "C" button will clear the collection.  The enter button is not programmed do to anything at the moment.

View solution in original post

Highlighted

@er229242 

 

That's it 🙂 Thank you very much!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,683)