PIN code screen with variables and conditionals issue

Hey guys,

I’m trying to prototype a full working confirmation screen for a banking app using a PIN code.

I found a pretty nice video but there’s an issue - I can’t have the #code2, #code3 and #code4 spaces work, the rest is doing great, but when I type the first number, it keeps switching the number, it doesn’t move to the next code space so I can type the full 4-digit code.

The guy says - the one in the video - that adding a ‘change to’ interaction will stop the loop and permit to move to the next space but it doesn’t.

I’d appreciate so much if someone can help!

The video I’m talking about:


Prototype link:


seems like a bug in Figma it would be nice if they added the break option out of the if statement

1 Like

Thx for your comment! :pray:t3: Any possible solutions?

Btw, do you mean this?

yeah when it reach to the “change to” it should break out the “if”, but this does’t seems the case it continues to the next condition.

in your case, I couldn’t see the full interaction because I don’t have edit access on your file

There you go, you have ‘edit’ access now:

Pls lmk Mo :slight_smile:

1 Like

I solved the issue by adding 4 variants of the Number pad component and move the conditions to the touch down , checking the code success in after delay function, hope my explanation was clear :sweat_smile:

you can check now it’s working

if this solved your issue please mark it as a solution

It works :pray:t3: I checked the changes you mentioned and tbh idk how you figured it out but it works lol. I still can’t understand 100% why it works, gotta see it a couple of times more to try to understand the logic. Thx Mo, really appreciate it!! Let’s connect, @sietto on IG.

hahaha thank you it took some meditation tbh.
Also I couldn’t find your IG you can dm me here.