How to open different screens

Hi People can you please help me check if there is anything wrong with my blocks i want it to open different screens when logging in based on users selection when registering kindly advice

@Eeugene this block will never work if all the tags are empty

ooh ok Aditya Lemi try not empty

1 Like

Make sure if users select tag 1 then other 2 are filled so that tag 1 become empty and it opens that screen

Why not store the screen names as the value of the key and the selection text as the key, that way it’s not dependent on the order, but on what they actually select? Then set a check to make sure the screen name isn’t a null value before you open it. It shouldn’t hit that null value, but in case it does you won’t throw an error.

I do something very similar with a dictionary in my app because I populate a FAB menu using the keys from the same dictionary to avoid any discrepancy.

Hi Gray kindly elaborate further

Since this is only a code snippet, it’s hard to tell what 1,2, & 3 are referring to. if it’s based on a selection of either button choices or something, I would store the choice as one value depending on the choice made. Then I would have a dictionary with the different choices as keys and the screen names as values. Then just open the screen associated with the key that the choice value matches. Something like this…

This opens the screen that is the value of the key in the dictionary, and the FAB text strings are the keys. Using this you should NEVER have page = not found, but in the rare case that something messes up, it’s a catch.

1 Like

@Eeugene Wow See this :expressionless: :expressionless: Post No. 1 I have give you solution and you have marked your own post as the solution :unamused: :unamused: :unamused:

yeah sorry thanks dint see that let me correct it

1 Like

:cupid: :cupid: :cupid: :cupid: :cupid: :cupid: If you get any problem in future just message :grin:

Thanks i will for sure

1 Like

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