Hi,
I want to use else if condition over Display Mode property of field, e.g. If <Condition>, <DisplayMode.Disabled> else if <Condition>, <DisplayMode.Disabled> else <DisplayMode.Edit>.
Thanks
Solved! Go to Solution.
Hi Muhammad_Ali,
There are a couple of ways to do this using either If() or Switch() functions.
The If() function was also updated to operate much like a Switch statement, so you can probably just use If()
If( Condition, ThenResult [, DefaultResult ] )
If( Condition1, ThenResult1 [, Condition2, ThenResult2, ... [ , DefaultResult ] ] )
or looking at it another way;
If(condition, trueresult, condition, trueresult, condition, trueresult, defaultresult)
For your example;
If(condition, DisplayMode.Disabled, condition, DisplayMode.Disabled, condition, DisplayMode.Edit)
Hope this helps,
RT
Hi Muhammad_Ali,
There are a couple of ways to do this using either If() or Switch() functions.
The If() function was also updated to operate much like a Switch statement, so you can probably just use If()
If( Condition, ThenResult [, DefaultResult ] )
If( Condition1, ThenResult1 [, Condition2, ThenResult2, ... [ , DefaultResult ] ] )
or looking at it another way;
If(condition, trueresult, condition, trueresult, condition, trueresult, defaultresult)
For your example;
If(condition, DisplayMode.Disabled, condition, DisplayMode.Disabled, condition, DisplayMode.Edit)
Hope this helps,
RT
Hi @Muhammad_Ali,
The else if condition is not supported within PowerApps currently. I think the If function could achieve your needs within PowerApps.
The standard formula format of If function as below:
If( Condition, ThenResult [, DefaultResult ] ) If( Condition1, ThenResult1 [, Condition2, ThenResult2, ... [ , DefaultResult ] ] )
On your side, please take a try to set the DisplayMode property of the field to following formula:
If(
Condition1,
DisplayMode.Disabled,
Condition2,
DisplayMode.Disabled,
DisplayMode.Edit
)
More details about the If function in PowerApps, please check the following article:
Best regards,
Kris
Thanks, it is working.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
214 | |
205 | |
86 | |
59 | |
38 |