Hi @catto16 here is some guidance for you to get started!
Step 1: Design the First Screen 2. In the first screen (let's call it "ChoiceScreen"), add two buttons: one for "Yes" and one for "No." You can do this by going to the Insert tab and selecting the Button control for each choice.
Rename the buttons to "btnYes" and "btnNo" for clarity. You can do this by selecting the button and changing the Text property in the properties pane.
Add labels or text to indicate the choices if needed.
Step 2: Create Variables 5. In the app, you need to create two variables to track the number of clicks for each choice. Go to the View tab and select Variables to create two new variables:
- YesClicks (Type: Integer, Default: 0)
- NoClicks (Type: Integer, Default: 0)
Step 3: Configure Button Actions 6. For the "btnYes" button, set its OnSelect property to increment the "YesClicks" variable by 1:
Set(YesClicks, YesClicks + 1)
Step 4: Create the Second Screen
8. Add a new screen (let's call it "ResultsScreen") to your app. You can do this by clicking "New Screen" in the left panel.
In this screen, you can use labels or text controls to display the number of clicks for each choice. For example, you can use labels with text properties like this:
- Label for "Yes" clicks: Text(YesClicks, "0")
- Label for "No" clicks: Text(NoClicks, "0")
Step 5: Navigation
10. You can add a button or other navigation elements to allow users to move from the "ChoiceScreen" to the "ResultsScreen" when they are ready to see the results. Use the Navigate function to transition between screens:
Navigate(ResultsScreen, ScreenTransition.Fade)
This could also be added to each of the Yes or No buttons at the end of the onSelect if as soon as they have answered you wish to navigate them to the results page.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks
Andrew