cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Update Number text field value with a button

PointsUpdate.jpg

Hello Community!

 

I have a text field(PointsField) that contains a number value in my gallery. I would like to be able to click the button with the 5 on it and increase the text field value by 5. Any suggestions?

1 REPLY 1
Super User III
Super User III

@BubbleGhost 

Put this code in the OnVisible property of the screen.

Set(myCustomValue, 30)

 

Use this code in the Default property of the Text Input you want to increase by 5

myCustomValue

 

Finally, take this code and use it in the OnSelect property of the button

Set(myCustomValue, myCustomValue + 5)
Reset(Text_Input_FieldName);

 

Ensure the DisplayMode of the Text Input is set to this so the user cannot manually edit

DisplayMode.View

 

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

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

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (59,360)