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 / Not work when Set Disp...
Power Apps
Answered

Not work when Set DisplayMode to Disabled by if condition

(0) ShareShare
ReportReport
Posted on by 27

The Problem is when I only type in title and issue description the create button change to edit mode, it seem did not check the site and categories fields.

I tested I choose a value of categories choice and cancel it, then it work. So I set the default and DefaultSelectedItem to Blank(), it still not work on initial state. Any thing I done wrong?
 Capture1.PNG
Ed_Cheung_0-1609926429472.png
I using SharePoint list to store the information.
Title data type: text
Issue description data type: text
Site data type: choice
Categories data type: choice

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ed_Cheung ,

     

    The reason is even if no item is selected in the Combo box, by default, there is a Blank() record in it. Only if you select some item then de-select it IsEmpty() would return true. See below screenshots:

    89.png.

    91.png

     

    So, for above reason, IsBlank() is the way to achieve your goal.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ed_Cheung ,

     

    After a bit more test I found that IsBlank(Combobox.Selected) would return true if nothing selected in the combo box:

    98.png

     

    So you need to replace that two IsEmpty() function with IsBlank():

    If(
     IsBlank(Title_DCValue_CreateForm.Text) ||
     IsBlank(IssueDescription_DCValue_CreateForm.Text) ||
     IsBlank(Site_DCValue_CreateForm.Selected) ||
     IsBlank(Categories_DCValue_CreateForm.Selected),
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard