Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 0Mf5JEO65+Y0/+rKusG1+P
Power Apps - Building Power Apps
Answered

How to determine if an Image Control is empty

Like (0) ShareShare
ReportReport
Posted on 26 Jun 2019 13:44:10 by

Hi, this is my setup at the moment :

There is a Camera Control which when it's clicked sends a picture into a variable,

then an Image Control shows the image contained inside this variable

and there is a button that sends the image into a SharePoint Document Library with a Flow.

 

I would like to set the button.DisplayMode property to something like this :

If(IsEmpty(imageCapturedImage); Disabled; Edit)

But it doesn't work, my goal is to disable the button if no pictures have been selected yet.

 

Thanks in advance for any suggestion, ProNewbie

  • Community Power Platform Member Profile Picture
    on 28 Jun 2019 at 14:35:41
    Re: How to determine if an Image Control is emptyt

    Thanks to both for the answers, it worked using IsBlank() instead of IsEmpty().

     

    ProNewbie

  • v-xida-msft Profile Picture
    on 27 Jun 2019 at 06:32:02
    Re: How to determine if an Image Control is empty

    Hi @Anonymous ,

    How do you save the Captured picture into a variable within your app? Could you please share a bit more about the formula?

     

    Actually, it is not necessary to detect if the Image control is empty. As an alternative solution, you could consider detect if the variable which stores your captured image is blank.

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

    Set the OnSelect property of the Camera control to following:

    Set(CapturedPic, Camera1.Photo)

    Set the Image property of the Image control to following:

    CapturedPic

    Set the DisplayMode property of the Button control to following:

    If(
     IsBlank(CapturedPic),
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    Set the OnSelect property of the Button control to following:

    'YourFlowName'.Run(...); /* <-- Fire a flow, pass the captured picture to your flow */
    Set(CapturedPic, Blank()) /* <-- Reset the CapturedPic variable after your fire your flow */

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Verified answer
    Pstork1 Profile Picture
    66,093 Most Valuable Professional on 26 Jun 2019 at 13:57:50
    Re: How to determine if an Image Control is empty

    Use IsBlank rather than IsEmpty, which is for tables or collections.

    If(IsBlank(Image1.Image),DisplayMode.Disabled, DisplayMode.Edit)

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 10

#2
LC-26081402-0 Profile Picture

LC-26081402-0 6

#3
EE-04041031-0 Profile Picture

EE-04041031-0 4

Overall leaderboard
Loading started