Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

empty space in vertical gallery image

Like (0) ShareShare
ReportReport
Posted on 17 Apr 2023 12:36:22 by 22

I have a canvas app with vertical gallery connected to a data source that has image column that store images on some but not all rows.

When the vertical gallery populates its fields from the data source, it shows big blank white space if no image in the source data row.

I want to get rid of the empty white space or hide it when no image.

 

without image: 

chuck3138_0-1681735307989.png

 

 

with image. 

chuck3138_1-1681735350418.png

 

 

 

 

  • Verified answer
    chuck3138 Profile Picture
    22 on 17 Apr 2023 at 15:50:41
    Re: empty space in vertical gallery image

    turns out another user here had the same issue and solved it. Solved: Hide Datacard when field is empty - Power Platform Community (microsoft.com)

    it worked for me with this following code which sets gallery image height to zero if image data is empty:

    Height=If(!IsBlank(ThisItem.image), someHeightValue,0)

  • WiZey Profile Picture
    3,023 Super User 2025 Season 1 on 17 Apr 2023 at 13:18:53
    Re: empty space in vertical gallery image

    That's not an error, Power Apps is simply telling you it cannot evaluates the formula because it's using a variable value instead of constants. You too wouldn't be able to evaluate a formula if you don't know all of its variables value.

  • chuck3138 Profile Picture
    22 on 17 Apr 2023 at 13:13:09
    Re: empty space in vertical gallery image

    I have a scope error when I tried: If(IsBlankOrEmpty(ThisItem.image)

    see 

    chuck3138_0-1681737181750.png

     

  • WiZey Profile Picture
    3,023 Super User 2025 Season 1 on 17 Apr 2023 at 13:01:29
    Re: empty space in vertical gallery image

    You can, however it will change the image's height and not the rows' height.

     

    If you want to change the rows' height, you should use a flexible gallery. 

  • chuck3138 Profile Picture
    22 on 17 Apr 2023 at 12:58:45
    Re: empty space in vertical gallery image

    is it possible to use IsBlankOrEmpty(Image)

    to set the image Height= zero if true?

    chuck3138_0-1681736394696.png

     

     

  • WiZey Profile Picture
    3,023 Super User 2025 Season 1 on 17 Apr 2023 at 12:40:43
    Re: empty space in vertical gallery image

    Hello @chuck3138 ,

     

    Basically, you want rows with pictures to show and rows without pictures to stay hidden?

     

    Have you tried to "Filter()" them out?

     

    Filter(
     datasource,
     IsBlankOrempty(Image)
    )

     

    Hope this was helpful to you.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 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…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 250 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 122

#3
stampcoin Profile Picture

stampcoin 108

Overall leaderboard
Loading started