Dropdown field config!

I need help to configure a dropdown field.
There are many here in the forum who have asked the same question, but unfortunately I can not find an answer that can solve my problem!

  1. I created an “Option list” with 3 options:

  2. Under “Page variables” I created three variables, page1, page2 and page3:

Under “logic” it looks like this:

When I select “Option1” from the dropdown field, page1 starts, which is correct.
But when I select “Option 2” or “3”, then have to start “page2” or page3, which does not, because I do not know exactly what to have under “Selected value”!

Hi @user25 here’s how to do it:

  1. Create page variable to hold the dropdown selected value:

  1. Create option list:

  1. Bind the dropdown selected value to the variable:

  1. In page logic, listen to the page variable changed event. Then with an if condition, check for each of the page options, pageVars.pageToOpen === "page1" and so on, until one of them matches. (replace Toast with “Open page” flow)

1 Like

Thank you Mari for your answer :slight_smile:
I did exactly what you said, but unfortunately it does not work!
The dropdown menu does not launch any pages.


Hi, it does work for me at least in the web preview when I change the Toasts to Open page nodes.

Can you share a screenshot of your option list, do the values match the values that you are checking for in the If condition nodes?

I found the error :slight_smile:
There was a big “P” in the “Page” on the “Option list”
Now it works as it should :slight_smile:
Many thanks Mari

1 Like

When I select “Page2” from the dropdown menu, “Page2” starts which is correct.
But when I go back to “Page1”, it is “Page2” that is selected in the dropdown menu.
If I select “Page1” from the menu instead of backing up, then a “Page1” starts behind the one that has already been started!
Watch the video and you will understand what I mean.
How do I solve this problem.

Hi, would it help to use an app variable instead? A page variable gets initialized every time the page loads, so that’s why the event is triggering even when you don’t want it to.

Thank you Mari for your suggestion.
Unfortunately, there was no difference!
When backing up from Page2 to Page1, it is Page2 that is selected in the dropdown menu

Hmm, that’s a bit of a tricky one. The selected page in the app var is Page2 when you go back because the information is saved everywhere in the app. You could use “Set app variable” to change the value back to “Page1”, but the issue is that might also trigger the “App variable changed” event and the open page logic. :thinking:

How can I avoid saving information in that particular page?
Or, is it not possible to add a logic that when I select page2 from the dropdown menu, page1 is refreshed before page2 starts?
Is this possible?

Navigation in the app works like a stack, so when you open page2 it opens “on top” of the first page, which is why you can’t refresh page1 without triggering the app variable changed event when page2 is open.

You could try using “Replace page” instead for the navigation, would that solve the issue? That should replace page1 with page2 instead of opening it on top.

Thanks Mari for the suggestion :slight_smile:
I tested the “Replace page” and it works, but not the way I want it.
I will continue with the “Replace page” until I find a better solution :slight_smile:

1 Like