cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Validate Dropdown box is not chosen

Hi all,

 

I am trying to change the display mode of my button based on the values of the input boxes, drop down box and date picker. The logic is like this: If all the values of input boxes are blank, or drop down box not selected ( default value shown is the choice from sharepoint) or date picker is not chosen (managed to set the date picker to blank), the display mode will be set to view.  

 

I wrote the following syntax but couldn't get it working. Suspect that the error comes from the dropdown boxes. Anyone can advise how to resolve this?

 

If(IsBlank(NameInput) Or IsBlank(emailadd_5) Or IsBlank(PInput_4) Or IsBlank(TInput_5) Or IsBlank(ServiceInput_4) Or IsEmpty(Dropdown_4) Or IsBlank(O_Input_4) Or IsEmpty(P_Dropdown_5) Or IsBlank(E_Input_5) Or IsBlank(O_Input_5) Or IsBlank(T_Input_5) Or IsBlank(Activity_Input_5) Or IsBlank(DateofLast) Or IsBlank(DateofNext), DisplayMode.Edit, DisplayMode.View)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Validate Dropdown box is not chosen

Have tested with;


If(IsBlank(NameInput) Or IsBlank(emailadd_5) Or IsBlank(PInput_4) Or IsBlank(TInput_5) Or IsBlank(STInput_4) Or IsBlank(Ohm_Input_4) Or IsBlank(Equip_5) Or IsBlank(OPInput_5) Or IsBlank(OTInput_5) Or
IsBlank(Activity_5) Or IsBlank(DateLast.SelectedDate) Or IsBlank(DateNext.SelectedDate) Or Dropdown_5.SelectedText.Value =Blank() Or Dropdown_4.SelectedText.Value=Blank(), DisplayMode.View, DisplayMode.Edit)

 

You can further play with

Dropdown_4.SelectedText.ColumnName

If you have issues with the formula.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

View solution in original post

6 REPLIES 6
Highlighted
Community Champion
Community Champion

Re: Validate Dropdown box is not chosen

It quite easier working with combobox on some of these issues. But you can try

Dropdown1.Selected.Value = Blank() || "" for all the Dropdowns.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Helper III
Helper III

Re: Validate Dropdown box is not chosen

Realise i have a typo for the syntax. Here is the revised on but still it doesn't work

 

If(IsBlank(NameInput.Text) Or IsBlank(emailadd_5.Text) Or IsBlank(PInput_4.Text) Or IsBlank(TInput_5.Text) Or IsBlank(STInput_4.Text) Or IsBlank(Ohm_Input_4.Text) Or IsBlank(Equip_5.Text) Or IsBlank(OPInput_5.Text) Or IsBlank(OTInput_5.Text) Or IsBlank(Activity_5.Text) Or IsBlank(DateLast.SelectedDate) Or IsBlank(DateNext.SelectedDate) Or IsEmpty(Dropdown_5.SelectedText.Value) Or IsEmpty(Dropdown_4.SelectedText.Value), DisplayMode.View, DisplayMode.Edit)

Highlighted
Community Champion
Community Champion

Re: Validate Dropdown box is not chosen

Have tested with;


If(IsBlank(NameInput) Or IsBlank(emailadd_5) Or IsBlank(PInput_4) Or IsBlank(TInput_5) Or IsBlank(STInput_4) Or IsBlank(Ohm_Input_4) Or IsBlank(Equip_5) Or IsBlank(OPInput_5) Or IsBlank(OTInput_5) Or
IsBlank(Activity_5) Or IsBlank(DateLast.SelectedDate) Or IsBlank(DateNext.SelectedDate) Or Dropdown_5.SelectedText.Value =Blank() Or Dropdown_4.SelectedText.Value=Blank(), DisplayMode.View, DisplayMode.Edit)

 

You can further play with

Dropdown_4.SelectedText.ColumnName

If you have issues with the formula.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

View solution in original post

Highlighted
Helper III
Helper III

Re: Validate Dropdown box is not chosen

Hi Eska,

 

My dropdown box by default shows the first item of the choices in SharePoint list and therefore it is not blank. How do i check if the user has made changes on the choice selected ? And there is also another problem that the choice could be the value that he is selecting?

Highlighted
Community Champion
Community Champion

Re: Validate Dropdown box is not chosen

If don't want the dropdown Automatically have an item, change the AllowEmptySelection property of the dropdown  to true.

This should solve both problems.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Highlighted
Helper III
Helper III

Re: Validate Dropdown box is not chosen

Thanks Eka24, I managed to get it working !

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,158)