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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Gallery Based o...
Power Apps
Unanswered

Filter Gallery Based on 'In' Not 'Equal'

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

Goal:
If 'Document_Name' column of 'Client_Attachment_Library' has any 'items' that have (not equal or match) any of the content in 'Title' column of 'Document_List' then CircleIcon1 should be green else red.

I tried this formula, it didn'twork.
     If(Gallery7.Selected.Title in Client_Attachments_Library_Collection.Document_Name, RGBA(255, 0, 0, 1), Color.Red)

I have 'Gallery7' (Source: Document_List_Collection, Specifically 'Title' Column).
Phineas_5-1696203426958.png

I have 'Client_Attachments_Library' (Referencing specifically 'Document_Name').

Phineas_6-1696203636163.pngI have 'Documents_List'.

Phineas_7-1696203706019.png


Gallery7 - I have 'Gallery7' which has 'CircleIcon1'. I want CircleIcon1 'Fill' to be 'Red' or 'Green' based on whether an 'item' in 'Client_Attachment_Library' (Document_Name) has the content of 'Gallery7.Title' (circled below) - which in this case would be 'Driver License'; In this example the circle should be 'Green', as a document with that content in the 'Document_Name' column of the Library does exist.

Phineas_8-1696203842804.png


Client_Attachments_Library - The 'Client_Attachment Library' has a 'Document_Name' column. The content I want to compare is nested within the contents. This column has a document with 'Driver License' in the content (as required and specified in the above).

Phineas_1-1696202376699.png

Document_List - The 'Document_List' is part of the comparison, specifically the 'Title' column. 

Phineas_2-1696202495568.png

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    @Phineas ,

    Before I go anywhere else here, you have Red twice - RGBA(255, 0, 0, 1) is Red RGBA(0, 255, 0, 1) is Green - RGBA is Red/Green/Blue/Alpha with Alpha being transparency as a Decimal.

  • Phineas Profile Picture
    5,331 Moderator on at

    Sorry, just trying to provide as much information as I can.

    Goal:
    If an item in 'Gallery7 (Document_Title, column)' is in the contents of 'Client_Document_Library (Document_Name, column)', make the 'Gallery7 (CircleIcon1), 'Green' else 'Red'.

    The 'Client_Attachments_Library - Dcoument_Name' is formatted by a formula that combines pieces of several fields.

    Consequently, the content I'm concerned about is in the middle of 'Client_Attachments_Library - Dcoument_Name',
    - in this case 'Drivers License', I can put the content at the beginning or end, but the number of characters will
       rarely be the same. 

    Just trying to understand if there is a way to filter for the specific 30 items in the the 'Document_List - Title' if they appear in the 'Client_Attachments_Library - Dcoument_Name'?          

    Phineas_1-1696207821475.png

     

    Phineas_3-1696209502713.png

    Phineas_4-1696210211384.png

     

  • WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    @Phineas ,

    You have two problems to address here  - your formula will only work for an exact full match of the item and also spaces in your target or source fields will cause it to fail - so

    With(
     {
     _Data: 
     AddColumns(
     Client_Attachments_Library_Collection,
     "DocName",
     Substitute(
     Document_Name,
     " ",
     ""
     )
     ),
     _Select: 
     Substitute(
     Gallery7.Selected.Title,
     " ",
     ""
     )
     },
     If(
     CountRows(
     Filter(
     _Data,
     _Select in DocName
     )
     ) > 0,
     Color.Green,
     Color.Red
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard