I am trying to apply the below code on the Button DisplayMode, But getting error of Enum
Please advise what correction can be done to get the result as required.
Instead of referencing the control you need to reference the value of the control. Try the following instead
If(
!IsBlank(TextBox2_21.Text),
DisplayMode.Edit,
DisplayMode.Disabled
)
I test with only.
Try removing all but one of the conditions and make sure that one will do both edit and disabled. Then add them back in one at a time. That should tell you which one is causing the problem. Otherwise it al looks right to me.
It worked in the test screen.
But when applied the actual screen, where I want if the 4 criteria matches then only Edit mode else disabled mode.
The below does not bring error but all the time it remains in edit mode
Try removing the DisplayMode= from the two possible outcomes of the If. You are setting the value of the property because you are in the property. So you don't need to say what the values are applied to.
WarrenBelz
146,653
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional