web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formatting help: eithe...
Power Apps
Answered

Formatting help: either field can be blank, displaymode.disabled is true, edit for false

(1) ShareShare
ReportReport
Posted on by 378

If(
IsBlank(Checkbox1.Value) Or (IsBlank(DatePicker1)),
DisplayMode.Disabled,
DisplayMode.Edit
)

 

Currently doesn't work correctly even though i have no errors

Categories:
  • Ricardo_Costa Profile Picture
    150 on at

    in fact Checkbox1.values is already boolean, so you can try like this

     

    If(
    Checkbox1.Value Or (IsBlank(DatePicker1.SelectedDate)),
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,

    Please try using below formula -

    If(
    Checkbox1.Value && !IsBlank(DatePicker1.SelectedDate),
    DisplayMode.Edit,
    DisplayMode.Disabled
    )

    or you can try below one 

    If(
    !Checkbox1.Value Or IsBlank(DatePicker1.SelectedDate),
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

     

    @olsen9 

    Your formula as given

     

    If(
    IsBlank(Checkbox1.Value) Or (IsBlank(DatePicker1)),
    DisplayMode.Disabled,
    DisplayMode.Edit
    )
    
     

     

    Will not work if the checkbox is unchecked.

     

    app27a.gif

     

     

    So try it like this instead:

     

    If(
    !Checkbox1.Value Or (IsBlank(DatePicker1)),
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

     

    app27b.gif

     

    Check if it helps @olsen9 

  • olsen9 Profile Picture
    378 on at

    These work but only if you have a date included, and click checkbox,then the 2nd box is enabled.  as you can see I want either the top fields to be checked or have a date added to enable the disabled box below.  Here is my example of it not working as I checked checkbox1

    olsen9_0-1661375481472.png

     

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @olsen9 

     

    Swap the logic and check for if one is present, and if so use Edit, otherwise use Disabled.

     

     

    If(
    Checkbox1.Value Or (!IsBlank(DatePicker1)),
    DisplayMode.Edit,
    DisplayMode.Disabled
    )

     

     

    Now, if either the checkbox is checked, or the Date Picker is not blank, the other box will be enabled, otherwise it will be disabled:

     

    app27c.gif

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard