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

Conditional logic on DisplayMode of a Button

I have two dropdown lists. List A is a manually populated list with its first value being "". List B is a dynamically populated list with its initial default value blank. I have a submit button "btnSubmit" that I would like conditional logic applied to only make clickable if either BOTH dropdowns are not blank OR both values are NOT filled. Only one of the dropdowns should have a value for the submit button to be clickable.

 

My initial attempts to get the button to function have failed even with basic if statements applied to the dropdowns. When I attempt to apply the logic, I get errors in the formula. For instance, when I type If(ddlListA.Selected.Value <> ""),DisplayMode.Edit,DisplayMode.Disabled) It errors on the "value" in the formula as if that is not a valid call. When I use the real name of the cell, however, I don't get the errors (although the logic still doesn't work), such as If(ddlListA.Selected.'Real Name' <> ""),DisplayMode.Edit,DisplayMode.Disabled).

 

While I am trying to get the more complex conditional formatting applied to the submit button, I can't even get the most basic logic applied. Any ideas on what I am doing wrong?

 

Thanks for the help.

A.Dove

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Conditional logic on DisplayMode of a Button

@adove 

Your formula on the DisplayMode property of your Button should be the following:

If(
    !IsBlank(ddListA.Selected.'Real Name') || !IsBlank(ddListB.Selected.Value),
    Edit,
    Disabled
)
    

Now, for the 'Real Name' and the Value on ListA and ListB respectively, this is all going to depend on the Items property of those controls.  If you still run into issues with it, then post back with the Items properties of those two controls.

 

Also, you mentioned "OR both value are NOT filled" - are you referring to some other controls, or did I misunderstand?

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

3 REPLIES 3
Highlighted
Helper II
Helper II

Re: Conditional logic on DisplayMode of a Button

I have also tried another formula, but it also does not work correctly. Although there are no formula errors, the result is that the button simply does not so at all.

 

If(Len(ddlListA.Selected.'Full Name') >= 1,DisplayMode.Edit,DisplayMode.Disabled)

 

Any help would be appreciated.

Thanks

A.Dove

Highlighted
Super User III
Super User III

Re: Conditional logic on DisplayMode of a Button

@adove 

Your formula on the DisplayMode property of your Button should be the following:

If(
    !IsBlank(ddListA.Selected.'Real Name') || !IsBlank(ddListB.Selected.Value),
    Edit,
    Disabled
)
    

Now, for the 'Real Name' and the Value on ListA and ListB respectively, this is all going to depend on the Items property of those controls.  If you still run into issues with it, then post back with the Items properties of those two controls.

 

Also, you mentioned "OR both value are NOT filled" - are you referring to some other controls, or did I misunderstand?

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Highlighted
Helper II
Helper II

Re: Conditional logic on DisplayMode of a Button

@RandyHayes 

 

Using your formula I expanded it to the following working solution. Thank you for your assistance.

 

If(
((IsBlank(ddlPartner.Selected.'Full Name') && IsBlank(ddlPartnerType.Selected.PartnerTypeCalculated)) || (!IsBlank(ddlPartner.Selected.'Full Name') && !IsBlank(ddlPartnerType.Selected.PartnerTypeCalculated))),
Disabled,
Edit
)

 

Regards,

ADove

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

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,055)