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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If statement isn't wor...
Power Apps
Unanswered

If statement isn't working

(0) ShareShare
ReportReport
Posted on by

Hello everyone.

 

I am develoing an app and I have an If statement that is not working. The If statement is on the DisplayMode function of the "Reservar" button.

 

 

If(
 Switch_ComedorStatus.Value = false & galleryAvailRoom.Selected.Título = "COMEDOR"; DisplayMode.Disabled;
 cbDeskSelect_2.Value = false; DisplayMode.Disabled; DisplayMode.Edit
)

 

 

 I just selected "COMEDOR" and the switch is in false value, but the button is still in DisplayMode.Edit:

Jose_D07_0-1611613248005.png

Please someone help me with this 😣

I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Please use "&&" instead of "&".

    "&&" means and

     

    You could try the following formula

    If(
    Switch_ComedorStatus.Value = false && galleryAvailRoom.Selected.Título = "COMEDOR"; DisplayMode.Disabled;
    cbDeskSelect_2.Value = false; DisplayMode.Disabled; DisplayMode.Edit
    )

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard