cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexanderb1
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

@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
mdevaney
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."

er229242
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.

 

 

@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.

@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

@er229242 

 

That's it 🙂 Thank you very much!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (105,496)