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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Three Condition IF statement - Unsure on Structure

(0) ShareShare
ReportReport
Posted on by

Hello, I have a button which should be enabled = DisplayMode.Edit once and only when, three conditions are met.

The conditions are:

  1. The image size being uploaded is less than 2Mb

 

Len(vImg) < 1460000​

 

  • The retrieved EmployeeID, passed back to PowerApps from a MS Flow, held in a variable, isn't blank

 

theResult.employeeid = Blank()​

 

  • The person running the canvas app, has ticked a checkbox to confirm the upload

 

Checkbox.Value = false​

 

 

I can't work out the structure of the IF statement, to Disable the Button if one or all aren't met? However I try to form the startement, as soon as the checkbox is ticked the button is enabled, but I can clearly see there isn't an EmployeeID present?

 

This is where I got to yesterday, before closing the laptop lid!!!

 

If(
 Checkbox.Value = false && theResult.employeeid = Blank() && Len(vImg) < 1460000,
 Disabled,
 If(
 Len(vImg) > 1460000 && Checkbox.Value = true && Not(theResult.employeeid=Blank()),
 Edit
 )
)

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    Gerard Simpson Profile Picture
    2,987 Moderator on at
    Re: Three Condition IF statement - Unsure on Structure

    Hi @LukePWilkins 

     

    Try the following:

     

    If(
     Checkbox.Value && !IsBlank(theResult.employeeid) && Len(vImg) < 1460000,
     Edit, 
     Disabled
    )
    

     

    Hope this helps 

  • LW-28112008-0 Profile Picture
    on at
    Re: Three Condition IF statement - Unsure on Structure

    Just brilliant!!! How did I not see it!!!!! I reckon I had spent too much time looking at it yesterday. 

    Thank you @AmDev 

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

Coming soon: forum hierarchy changes

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 819 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard