Skip to main content

Notifications

Community site session details

Community site session details

Session Id : IL/6GhtRfmRH9byWQCmSHx
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
    35,061 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 Winners! 🌸

Congratulations to all our community participants!

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
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 104

#3
stampcoin Profile Picture

stampcoin 80

Overall leaderboard
Loading started