Skip to main content

Notifications

Community site session details

Community site session details

Session Id : J5jTtuRHsNx4Cg7mZkygPi
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

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…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,077 Most Valuable Professional

Leaderboard
Loading started