Skip to main content

Notifications

Community site session details

Community site session details

Session Id : aO904kX/Mwh2ZlqhD1OnlO
Power Apps - Building Power Apps
Answered

Image Control - Check Gallery

Like (0) ShareShare
ReportReport
Posted on 3 Jun 2024 10:12:28 by 81

Hello,

 

I am building an Asset Management tool.

 

I have an Upload Image control thats working and patching and displaying correctly (ViewAssets.Selected.Image - working).

 

I want to be able to change the image, I was trying: (Checking the gallery, but allowing me to swap image out if needed)

 

If(
!IsBlank(ViewAssets.Selected.Image),
ViewAssets.Selected.Image,
If(
IsBlank(AddMediaButton1_1.Media),
SampleImage,
AddMediaButton1_1.Media
)
)
 
Logically this seems sound but Im getting an error, EXPECTED IMAGE VALUE.
Categories:
  • Verified answer
    CraigRooney Profile Picture
    81 on 04 Jun 2024 at 08:28:39
    Re: Image Control - Check Gallery
    If(IsBlank(AddMediaButton1_1.Media), ViewAssets.Selected.Image.Full, AddMediaButton1_1.Media)
     
    This ended up being the working formula. I needed to add Image.FULL to get it working. 
  • timl Profile Picture
    34,939 Super User 2025 Season 1 on 03 Jun 2024 at 10:46:07
    Re: Image Control - Check Gallery

    Hi @CraigRooney 

    The upload image control is a composite control and it's the image control that you need to reference (eg UploadedImage1) rather than the Media property of the button.

     

    timl_0-1717411288684.png

    Also, the Coalesce function should logically perform the same function as your 2 nested If statements.

    Coalesce(ViewAssets.Selected.Image,
     UploadedImage1_1.Image,
     SampleImage
    )

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started