'How to set mandatory choices to navigate to the next screen?

The main screen of my app has three questions:

1- A question with 6 choices in a dropdown named Office.

2- A question where the user picks one of the departments with 6 checkboxes.

3- A question with 9 choices in a dropdown named Type.

When the user is done selecting the answers the Next button can be pressed. However, I would like the survey to only allow the user to go to the next screen after he picks an answer for each question.

Here is the code that I have in the ONSELECT section of the button.

Switch(Type.Selected.Value,"360", Navigate('360',ScreenTransition.None));Switch(Type.Selected.Value,"Report", Navigate(ReportRequest_Main,ScreenTransition.None));Switch(Type.Selected.Value,"Bulk", Navigate(Bulk,ScreenTransition.None));Switch(Type.Selected.Value,"Changereport", Navigate(ChangeReport,ScreenTransition.None));Switch(Type.Selected.Value,"Grouping", Navigate(Grouping,ScreenTransition.None));Switch(Type.Selected.Value,"Recode", Navigate(Recode,ScreenTransition.None));Switch(Type.Selected.Value,"View", Navigate(VP,ScreenTransition.None))

enter image description here



Solution 1:[1]

You could use a condition of the below pattern in the Next button's Visible or DisplayMode property:

Not(Or(IsBlankOrError(Type.SelectedItems), IsBlankOrError(Office.SelectedItems),...))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mmikesy90