How to Enter Multiple Numerical Entries for Calc

Super Magician shared this question 1 year ago
Answered

Good day,


I am trying to make the prototype enter numerical values as buttons are taped, but seems to just replace one another.

I used on Tap>Set Value>Fixed Value. But it seems just to replace one another not adding.

I will like that is a number is pushed it should add.

Example: if 1 is pushed and 5 pushed later on, it should display "15".

Thanks

Best Answer
photo

Hi there,

You should include at each of the buttons a calculated expression instead of adding a fix value. This calculated expression must be: INPUT TEXT FIELD (where the amount is introduced) CONCAT & the NUMBER BUTTON.

See the example attached (I have modified only the values 1, 2 & 3). Hope it helps.

Best,

Comments (6)

photo
1

Hi there,


Are you using an "Input Text Field"? Have you changed the "Type" to a number instead of letters ?


Best,

photo
1

Yes i am using "Input Text Field" and i have changed the type to number.


But for the button, i used "On Tap" >> "Set Value(to)" and i enter a fixed value. But i noticed that when enter "let me say Number 1" and pushing Number 2 it changes the value from 1 to 2 ratherthan adding to it side, so i like it to appear "123" if button 1,2,and 3 our pressed in that order.

Thanks

photo
1

Do you have an example .vp file of what you're describing so we can take a look? You can attach it in a .rar format, or upload it to a file sharing service such as Dropbox, and attach the link to it here.


Best,

photo
1

Hi there,

You should include at each of the buttons a calculated expression instead of adding a fix value. This calculated expression must be: INPUT TEXT FIELD (where the amount is introduced) CONCAT & the NUMBER BUTTON.

See the example attached (I have modified only the values 1, 2 & 3). Hope it helps.

Best,

photo
1

Thanks that is what i wanted. Thanks Alot

photo