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 / Merging IF statement t...
Power Apps
Answered

Merging IF statement to maintain logic in PowerApps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am wanting to allow my update button to be greyed out since a change has occurred. I simply wish to merge these two if statements correctly, but it seems as though I am doing something wrong here.

 

Background 

 
 

capture3.PNG

I am wanting the Update button to display as greyed out while keeping the existing logic within the app.

The existing logic is:

 

 

If(
    Or(
        IsBlank(NewFeatureDomainDD.SelectedText.Value),       
        IsBlank(NewFeatureStatusDD.SelectedText.Value)
    ),
    DisplayMode.Disabled,
    DisplayMode.Edit)
 
How do I also incorporate further logic:
 
If(IsUnsaved, DisplayMode.Edit, DisplayMode.Disabled)
 
I have tried to do:
 
If(
    And(
        IsBlank(NewFeatureDomainDD.SelectedText.Value),       
        IsBlank(NewFeatureStatusDD.SelectedText.Value)
        UnSaved
    ),
    DisplayMode.Disabled,
    DisplayMode.Edit)
 
 
I am thinking these two statements must be merged? Any suggestions are appreciated.
 

 

capture3.PNG
Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @jasmine2020 

    Try this...

     

    If(
     IsBlank(NewFeatureDomainDD.SelectedText.Value) 
     Or IsBlank(NewFeatureStatusDD.SelectedText.Value)
     Or IsUnsaved,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @jasmine2020 ,

    Based on the If function logic that you mentioned, I think there is something wrong with it.

     

    I have made a test on my side, please consider take a try with the following workaround:

    Set the DisplayMode property of the "UpdateFeatureBtn" to following:

    If(
     IsBlank(NewFeatureDomainDD.SelectedText.Value) || IsBlank(NewFeatureStatusDD.SelectedText.Value) || !IsUnsaved,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    Please try above solution, hopes it could solve your problem.

     

    Regards,

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard