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
Solved! Go to Solution.
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.
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
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.
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
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
254 | |
238 | |
83 | |
36 | |
28 |
User | Count |
---|---|
319 | |
263 | |
122 | |
68 | |
44 |