How to return to the first value from the label after I choose an item in a spinner?

I am trying to make an algorithm where after the user choose the number of seats from the spinner, the amnt label will automatically put its total amount. Then if the user choose again another number of seats, the total amount label will change too. Now my problem is, how can I change the total amount if the user chooses a number of seats which he chose before?

For example, If I choose 1 in the number of seats, the amnt label will automatically put 75, and if I choose 3, the said label will change to 225 (since I applied multiplication to calculate the total amount). Then if I want to choose again 1, I want the the total amount to change to 75 again. But I don’t how to do it, I tried some methods but it still didn’t work.

So far, this is the algorithm that I made.

1 Like

You can use cost of per seat in a local or global variable.

So if the user chooses any number , just multiple the selection with variable. This will work for tou

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.