Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to have gallery only display certain documents

Like (1) ShareShare
ReportReport
Posted on 30 Aug 2023 13:07:39 by 18

Hi everyone

 

I am trying to make a gallery that only displays certain documents in my powerapp. I know that all name for that files I want to display will always start with '6' and have a '-' at the 8th position in the string.

 

Fredemanze_1-1693400692580.png

 

I have tried different variations of what is seen in the photo above thus far, it keeps giving me an error.

 

Any help with this would be much appreciated

 

Thank you!

  • Fredemanze Profile Picture
    18 on 30 Aug 2023 at 15:09:17
    Re: How to have gallery only display certain documents

    Yes this worked much better for me. Thank you @poweractivate !

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on 30 Aug 2023 at 15:00:48
    Re: How to have gallery only display certain documents

    Instead of using the child controls of Gallery, see if changing the Items property to below formula may be a better approach for you, then leaving the child controls untouched.

    Try with a new Gallery and see if the below formula works for you:

    You place the below formula in the Items property of the Gallery:

    Filter(yourDataSource, StartsWith(Name, "6"))

    Replace yourDataSource in the above with the actual name of your data source.

     

    If approach above doesn't work for you, you can continue the approach you were doing.

    However, above may be a better approach for you.

    I intentionally do not use Left, Value, etc. in the above Filter as these are likely not delegable.

    However its seems you simply want to check if the Name starts with a "6" so the above filter may work, as it's not important if the value type is a number or not, just seeing if the name starts with "6" in particular may suffice and may be fully delegable as well.

    See if it helps @Fredemanze 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on 30 Aug 2023 at 14:53:25
    Re: How to have gallery only display certain documents

    @Fredemanze 
    Yes try going into the Height property of especially the Rectangle2 (probably only that one) and try using same formula you used, except instead of true, false, use (whatever was there before), 0 

  • Fredemanze Profile Picture
    18 on 30 Aug 2023 at 14:43:34
    Re: How to have gallery only display certain documents

    Thank you @poweractivate , that worked for hiding these. However the lines where these were are now just blank, is there any way to make it so these disappear completely?

    Fredemanze_0-1693406592692.png

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on 30 Aug 2023 at 13:56:03
    Re: How to have gallery only display certain documents

    value is not a correct syntax in Power Fx,

    It has to be an uppercase V,

    Value

    try that see if it helps

    Like the below:

    Value

     See if this helps @Fredemanze 

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…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 58 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard