cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dave-ITMan
Helper IV
Helper IV

Include Default Dropdown Selection in IsBlank Code

Hi Experts,

 

On my OnSelect of my button, I have the below code to make sure that all fields aren't left blank before continuing to the next screen, all of the dropdown boxes have the default option set to "Please select an option", is there a way that I can include that to make sure the user actually selects something from that drop down list? Also in the notify message, is there a way of telling them which ones haven't been filled in? 

 

If(
    IsBlank('Dropdown-1'.Selected.Value) ||
    IsBlank('Date-Created'.SelectedDate) || 
    IsBlank('Dropdown-2'.Selected.Value) || 
    IsBlank('Date-Closed'.SelectedDate) || 
    IsBlank('Dropdown-3'.Selected.Value) || 
    IsBlank('Dropdown-4'.Selected.Value) || 
    IsBlank('Job-Number'.Text) || 
    IsBlank('Dropdown-5'.Selected.Value) || 
    IsBlank('Dropdown-6'.Selected.Value) || 
    IsBlank('Dropdown-7'.Selected.Value) || 
    IsBlank('Dropdown-8'.Selected.Value) || 
    IsBlank('Dropdown-9'.Selected.Value) || 
    IsBlank('Txt-1'.Text) || 
    IsBlank('Txt-2'.Text) || 
    IsBlank('Dropdown-10'.Selected.Value),
    
    Notify("Please fill out all items"),
    Navigate(Costs,Cover)
)

 

11 REPLIES 11

Hi,
OnAppStart or on Screen (where you form/controls are there) OnVisible property you can add => Set( varOnSubmit, false)

If(
    'Dropdown-1'.Selected.Value = "Please select an option" ||
    IsBlank('Date-Created'.SelectedDate) || 
    'Dropdown-2'.Selected.Value = "Please select an option" || 
    IsBlank('Date-Closed'.SelectedDate) || 
    'Dropdown-3'.Selected.Value = "Please select an option" || 
    'Dropdown-4'.Selected.Value = "Please select an option" || 
    IsBlank('Job-Number'.Text) || 
    'Dropdown-5'.Selected.Value = "Please select an option" || 
    'Dropdown-6'.Selected.Value = "Please select an option" || 
    'Dropdown-7'.Selected.Value = "Please select an option" || 
    'Dropdown-8'.Selected.Value = "Please select an option" || 
    'Dropdown-9'.Selected.Value = "Please select an option" || 
    IsBlank('Txt-1'.Text) || 
    IsBlank('Txt-2'.Text) || 
    'Dropdown-10'.Selected.Value = "Please select an option",
    Set(varOnSubmit, true);
    Notify("Please fill out all items"),
Set(varOnSubmit, false);
    Navigate(Costs,Cover)
)

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @Nogueira1306 , thanks, i've made all of these changes now and all perfect, thank you so much for your help!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,610)