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

Disable button condition

Hi all, 

 

I am trying to disable a button displaymode with the following condition:

 

If(Not(IsBlank(DataCardValue12.Text)), Not(IsBlank(DataCardValue15.SelectedItems)), DisplayMode.Edit, DisplayModeDisabled)

 

DataCardValue12.Text = Text Input 

DataCardValue15.SelectedItems = ComboBox (PeoplePicker)

 

I am getting this error: Invalid argument type(Text). Expecting a Boolean value instead.

 

Basically I want the button to be disabled until the two datacards have been filled out.

 

- Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Try:

If(!IsBlank(DataCardValue12) Or !IsEmpty(DataCardValue15.SelectedItems), DisplayMode.Edit, DisplayMode.Disabled)

Or

If(!IsBlank(DataCardValue12) && !IsEmpty(DataCardValue15.SelectedItems), DisplayMode.Edit, DisplayMode.Disabled)

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

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

3 REPLIES 3
Highlighted
Memorable Member
Memorable Member

Hi @MichaelBL 

 

Please try this one: 

If(IsEmpty(DataCardValue12.Text)|| IsBlank(DataCardValue15.SelectedItems), DisplayMode.Disabled, DisplayMode.Edit)

 

Hope it helps !

Highlighted
Super User III
Super User III

Try:

If(!IsBlank(DataCardValue12) Or !IsEmpty(DataCardValue15.SelectedItems), DisplayMode.Edit, DisplayMode.Disabled)

Or

If(!IsBlank(DataCardValue12) && !IsEmpty(DataCardValue15.SelectedItems), DisplayMode.Edit, DisplayMode.Disabled)

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

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

Hey @eka24 

 

This one worked: 
If(!IsBlank(DataCardValue12) && !IsEmpty(DataCardValue15.SelectedItems), DisplayMode.Edit, DisplayMode.Disabled)

 

Thank you very much mate, and also thank you @gabibalaban for chipping in!

 

Best regard

Michael

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,850)