Simple sum/addition is being miscalculated

The easy explanation:
I’m trying to add +1 to a user’s balance every time they buy a specific item. However, when the action is performed, it’s adding +6 or +7. Which is not the right calculation/sum. It’s also weird that sometimes it’ll add 6 and sometimes it’ll add 7.

This is the action I have set up. When the user’s purchase is successful, it updates the logged in user’s balance to add 1:

In this screen, before I make a purchase, it clearly shows my balance is 0:

After I make the purchase, it shows my balance is 6:

Any thoughts?

Hey Kendall, this is strange and I think I have seen something similar before. Do you have any screen actions?

Hey Archer! I have no screen actions.

hmm any other actions on those buttons?

I just know that sometimes you can accidently get things to loop with other actions.

Does the same function work on a different button on a different page?

The only other action on the button is linking to another page.

Let me test this function on a different button a different page! Will report back

Okay wow. So it works on other general buttons on other screens. And it works in other buttons within lists on other screens. Adds up perfectly.

So I think this issue is specifically around the Purchase Button action. I will create another payments list and page from scratch. Publish the build. And test via Testflight since that’s the only way to test the Purchase Button.

Okay. It seems the issue is in fact the IAP Button. When I use a regular button or even a button within a list, it adds things correctly.

But when I built a new payments sequence with the IAP Button, it added +7 instead of adding +1.

Any thoughts on what I should do next?

I won’t be much help with this. I haven’t used the payment function before. Sorry!!

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