web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : xVOHoxtlX4n9QBbMvPznOC
Power Apps - Building Power Apps
Unanswered

Hide Icon if no pictures match in SharePoint list

Like (0) ShareShare
ReportReport
Posted on 23 Feb 2022 21:59:35 by 1,512

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?

  • TheRobRush Profile Picture
    11,121 Moderator on 23 Feb 2022 at 23:02:09
    Re: Hide Icon if no pictures match in SharePoint list

    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)

  • Dorinda Profile Picture
    1,512 on 23 Feb 2022 at 22:53:16
    Re: Hide Icon if no pictures match in SharePoint list

    @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 

     

    Dorinda_0-1645656678781.png

    Dorinda_1-1645656744587.png

     

    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.

  • TheRobRush Profile Picture
    11,121 Moderator on 23 Feb 2022 at 22:48:49
    Re: Hide Icon if no pictures match in SharePoint list

    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.

  • Dorinda Profile Picture
    1,512 on 23 Feb 2022 at 22:40:24
    Re: Hide Icon if no pictures match in SharePoint list

    @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)
  • TheRobRush Profile Picture
    11,121 Moderator on 23 Feb 2022 at 22:35:04
    Re: Hide Icon if no pictures match in SharePoint list

    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

  • Dorinda Profile Picture
    1,512 on 23 Feb 2022 at 22:27:41
    Re: Hide Icon if no pictures match in SharePoint list

    @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.

  • TheRobRush Profile Picture
    11,121 Moderator on 23 Feb 2022 at 22:10:48
    Re: Hide Icon if no pictures match in SharePoint list

    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.

  • Matt1405 Profile Picture
    58 on 23 Feb 2022 at 22:07:39
    Re: Hide Icon if no pictures match in SharePoint list

    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? 

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 our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete