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

Simply increase a number with in a text box when button clicked

Hi Guys,

 

I seem to be struggling with what should be fairly simple, but just cant get it working and nothing google gives seems to help much..

 

I have a text box, lets call it  number

When i click a button, i want the number to increase by 1..?

 

normally i would use something like  number.text = number.text + 1 

But that doesnt work..

 

What / How can achieve this?

 

Thanks in advance!

G

1 ACCEPTED SOLUTION

Accepted Solutions

Set a var and on default of the textinput just write the var

 

So, imagine that the var always starts at 0. On OnStart you write:


Set(varNumber,  0)

 

Than, on button you write:

Set(varNumber, Value(number.text) + 1 )

 

And on the input just write varNumber

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

View solution in original post

3 REPLIES 3
Nogueira1306
Super User
Super User

Value(number.text) = Value(number.text) + 1 

 

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

@Nogueira1306  Thanks, Just tried but it doesn't work.

 

When i click the button, Nothing changes to the value in the textbox. 
The formula doesnt show an error either.

 

Any other ideas?

Set a var and on default of the textinput just write the var

 

So, imagine that the var always starts at 0. On OnStart you write:


Set(varNumber,  0)

 

Than, on button you write:

Set(varNumber, Value(number.text) + 1 )

 

And on the input just write varNumber

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,819)