I have a gallery, in that gallery I have an icon to indicate there are photos to view, if you click on the icon it displays the image in a image control.
I want to hide the icon if there are no matching photos for a specific substation. So only show if there is something to view.
Is that possible?
So in that case in the gallery where item info is you would want to make the visibility of the button a lookup
So basic idea there would be
If(
IsBlank(
LookUp(
/insert name of your img collection/,
/insert name of reference column in image collection/
=
/insert name of reference in the item gallery as ThisItem.columnname reference/,
/Insert Name of your image column in the image collection/)),false,true)
Sorry for typing it like this I am on my cellphone now so not as easy
But as long as you follow that format you should be able to figure it out
Its in shorter form without descriptions
If(IsBlank(Lookup(Source,Column = What, Return Column)),false,true)
@TheRobRush correct the gallery is connected to a collection and based on the click of the icon in the gallery a popup with the image control that matches
This is the code on the gallery of the popup
Filter(
AssetPhotos,
Substation.Value = Gallery4_2.Selected.Station && Asset_x0020_Class.Value = "Circuit Switcher"
)
So in this case we had photos for Burke, but we may not have them for anything else, I dont want the icon in the first gallery to display.
I'd have to see how your gallery is referencing your splist, and how your splist is laid out to give a better answer, the way you have it written above will not work. Are your gallery items and your images stored in different collections/lists or something? Because there's no need for referencing anything outside of thisitem.column name if it is all in one datasource, should only be checking if one = another if they are in separate locations.
@TheRobRush well i tried it with and without calling out the asset class and it still doesnt like it
If(IsBlank(AssetPhotos.AssetClass ="Circuit Switcher"),false, true)
It was just to give you a general idea,
If(IsBlank(ThisItem.Title),false,true)
would hide something if title field is blank, can change the thisitem.title to whatever column your image is in & if there is nothing in that column/row then it would not show up
@TheRobRush how is this looking at the photo library in that statement? The list is called AssetPhotos and the Title field is the image field and Substation is the column to check against.
should be able to set the visibility to something like If(IsBlank(ThisItem.photocolumn),false,true)
But I do not have a splist setup with an image column right now to test it out for you on my side, only one I have uses the link storage method.
You can give the icons visible control an if statement if(‘gallery’ isempty() false, true)
Can you show what you have so far, is each substation a separate table or colomn?
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2