Letters representing numbers

Hi ,
I have an app where the keyboard has buttons representing numbers 1-9, X and M, where M = 0 and X = 10.
The user inputs numbers, they are individually displayed and the sum is automatically calculated in a text box.
At present when a key is pressed it sets a global variant to the number. e.g. WhenButtonM.Click set globalScore to 0

Is there a way that when M is pressed, M is displayed but the number generated is 0?

Dear @Keith, if I've correctly understodd your need, please have a look to the annexed .aia.
Keith.aia (2.6 KB)
Cheers

Hi Uskiara,
This is great, so simple but great.
I don't meant to be ungrateful, but what I forgot to mention is that I need to assign the value of TobeComputed to other text boxes e.g. A1,A2,A3, then add them all up

So A1 could = 3, A2 could = M and A3 could = X, so the total would be 13.
This means that when A2.click A2.Text =TobeDisplayed , in this case M and at the same time A2 sets a unique value for ToBeComputed , in this case 0

Thanks to your suggestion The only thing I can think of create another variable for each A1,A2 and A3, then when A1 is clicked it sets A1.Text to TobeDisplayed and also set this new variable to the value of ToBeComputed,as this is unique to A1 it can be added to A2 and A3.
Does that makes sense.
If there is an easier way please feel free to correct me

Dear @Keith,
thenks for your feedback.
As you can easily understand, my .aia just contains a suggestion, you can therefore elaborate it as you like to suit your needs. And you will find more optimized solutions on your own, once you'll see that your app works as you intended.
The aim of PU is not not give to the user a ready made solution but to let the users have the "spark" to start the engine :muscle:
Best wishes.

Thank you, I appreciate your help, and will keep working at it

1 Like