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 2 Sharepoint Li...
Power Apps
Unanswered

Filter 2 Sharepoint Lists in 1 Gallery

(0) ShareShare
ReportReport
Posted on by 12

Hi All,

 

I've 2 SharePoint Lists. (List-1 is old data list & List-2 is new data list). Both lists have same columns.

I want to filter certain records from both lists based on the column named "XID".

 

I'm using a textinput control to filter the data. I want to filter both lists and show data in 1 gallery.

Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @ZRK ,

     

    Do you want to combine two filter results and show them in the gallery?

    If so, please try this.

    OnChange of TextInput.

    ClearCollect(COL,ShowColumns(Filter(List1,XID=Self.Text),"ColumnName1","ColumnName2"),ShowColumns(Filter(List2,XID=Self.Text),"ColumnName1","ColumnName2"))

    Items of Gallery.

    COL

    ColumnName1 and ColumnName2 are same named column in two list.

     

    Best regards,

    Rimmon

  • ZRK Profile Picture
    12 on at

    Thanks @v-mengmli-msft but i'm currently using this code. I'm working with a live updates data and the ClearCollect function requires to be pressed every time i update data.

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @ZRK ,

     

    Do you mean that list is updating at the same time? I think ClearCollect is required, have you tried use Timer control to complete press ClearCollect manually?

     

    Or you just don't want to press the ClearCollect function every time, you can combine two list on OnVisible of screen or OnStart of App firstly, the use the Filter.

    OnVisible of Screen.

    ClearCollect(COL,ShowColumns(List1,"XID","ColumnName1","ColumnName2"),ShowColumns(List1,"XID","ColumnName1","ColumnName2"))

    Items of Gallery.

    Filter(COL,XID=TextInput.Text)

     

     

    Best regards,

    Rimmon

  • ZRK Profile Picture
    12 on at

    Both lists have more than 50K records. They have a unique number in XID column that connects them. (connected records are not more than 5). Also i've to deal with the data fast. Is there any approach other than ClearCollect that can help me get records from both lists in one gallery?

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @ZRK ,

     

    Could you please show your formula? I expect more details.

     

     

  • ZRK Profile Picture
    12 on at
    ClearCollect(
        ccss,
        AddColumns(
            Filter(
                Leads2024,
                Last(
                    Split(
                        TextInput1.Text,
                        "@"
                    )
                ).Value = XID
            ),
            "SP_NAME",
            "LX-24"
        ),
        AddColumns(
            Filter(
                Leads2023,
                Last(
                    Split(
                        TextInput1.Text,
                        "@"
                    )
                ).Value = XID
            ),
            "SP_NAME",
            "LX-23"
        )
    )
  • ZRK Profile Picture
    12 on at
    ClearCollect(
        ccss,
        AddColumns(
            Filter(
                Leads2024,
                Last(
                    Split(
                        TextInput1.Text,
                        "@"
                    )
                ).Value = XID
            ),
            "SP_NAME",
            "LX-24"
        ),
        AddColumns(
            Filter(
                Leads2023,
                Last(
                    Split(
                        TextInput1.Text,
                        "@"
                    )
                ).Value = XID
            ),
            "SP_NAME",
            "LX-23"
        )
    )
  • VishalJhaveri Profile Picture
    1,169 Moderator on at

    You need to manage multiple collection on the Onchange property of the elements of the Gallery and then you are ready to go with the solution.

     

  • ZRK Profile Picture
    12 on at

    @VishalJhaveri That would increase the network calls

  • VishalJhaveri Profile Picture
    1,169 Moderator on at

    To me, that seems the only possible outcome then.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard