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:
with 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)
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.
I have a scope error when I tried: If(IsBlankOrEmpty(ThisItem.image)
see
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.
is it possible to use IsBlankOrEmpty(Image)
to set the image Height= zero if true?
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.
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,077
Most Valuable Professional