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 / Multiple If Statements...
Power Apps
Unanswered

Multiple If Statements with multiple conditions

(0) ShareShare
ReportReport
Posted on by

I must be missing one critical comma or semicolon...

 

I have a form that I'm trying to validate before going to the next screen by disabling a button. 

 

At the top of my form is a toggle that asks if certain characters are in an email address. If the toggle indicates false, and any of the following icons show an "x" mark (Cancel), then make the button DisplayMode.Disabled.  

If, instead of false, the answer on the toggle is true, then check the following icons (some different; some the same as the first condition) and if any of the icons show an x mark, then DisplayMode.Disabled otherwise, make the DisplayMode.Edit. 

 

I can get each of the statements to work perfectly as a standalone so I know the conditions are right and my fields filled in correctly.  But, I can't seem to figure out the nomenclature to get this statement to work for both conditions when I put them together.  I thought I had it working and when I returned -- not so much!  


If(
tgl_Non_TFS_Email_Address.Value = false And
ico_Non_TFS_Email_Address.Icon = Icon.Cancel Or
ico_Non_TFS_Email_Office_Location.Icon = Icon.Cancel Or
ico_First_Name.Icon = Icon.Cancel Or
ico_Last_Name.Icon = Icon.Cancel Or
ico_Group.Icon = Icon.Cancel Or
ico_BRG.Icon = Icon.Cancel Or
ico_Role.Icon = Icon.Cancel Or
ico_Chapter.Icon = Icon.Cancel,
DisplayMode.Disabled,

If(
tgl_Non_TFS_Email_Address.Value = true And
ico_Thermo_Email_Name.Icon = Icon.Cancel Or
ico_BRG.Icon = Icon.Cancel Or
ico_Role.Icon = Icon.Cancel Or ico_Chapter.Icon = Icon.Cancel,
DisplayMode.Disabled,
DisplayMode.Edit
))



Thanks very much for your help and consideration. 

 

 

Categories:
  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @CindyZ ,

    Firstly, try some bracketing around your and/or arguments

    If(
     (
     !tgl_Non_TFS_Email_Address.Value &&
     ico_Non_TFS_Email_Address.Icon = Icon.Cancel
     ) ||
     ico_Non_TFS_Email_Office_Location.Icon = Icon.Cancel ||
     ico_First_Name.Icon = Icon.Cancel ||
     ico_Last_Name.Icon = Icon.Cancel ||
     ico_Group.Icon = Icon.Cancel ||
     ico_BRG.Icon = Icon.Cancel ||
     ico_Role.Icon = Icon.Cancel ||
     ico_Chapter.Icon = Icon.Cancel,
     DisplayMode.Disabled,
     (
     tgl_Non_TFS_Email_Address.Value &&
     ico_Thermo_Email_Name.Icon = Icon.Cancel
     ) ||
     ico_BRG.Icon = Icon.Cancel ||
     ico_Role.Icon = Icon.Cancel || 
     ico_Chapter.Icon = Icon.Cancel,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • CindyZ Profile Picture
    on at

    Wow, thanks but that did not work.  It seems so strange that I believe I had it working fine at one point -- with my original code but I must have been on the hard side of hoping and dreaming!   Here's to Plan M (I'm sure I'm/we're at least that far along 😁

    CindyZ_0-1679790865080.png

    My form -- I confirmed the name of each control.My form -- I confirmed the name of each control.New CodeNew Code

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard