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 : Vf1+WA1tbXLF9RmizuDACm
Power Apps - Building Power Apps
Answered

Trying to filter a collection by GUID and it always shows all results

Like (0) ShareShare
ReportReport
Posted on 7 Jun 2023 18:54:16 by 85

I have an app, where I am trying to link comments to a order record by writing the GUID from the order into a field on the comments.  But I cannot filter only the comments associated to each record.

 

I can successfully collect (ThisItem) the GUID in a Gallery and add it to a variable

      Set(gvID, ThisItem.'Orders Master');

This works!   I can see the GUID as a variable successfully by adding a text field with gvID in the Text field

 

Then I clear collect a collection of Comments, where I grab only the columns that I want to see.  The crf0b_masterid is a GUID that has the GUID from the Master Table (to link to).

      ClearCollect(colComments, ShowColumns('Comments', "crf0b_comment", "createdby", "crf0b_masterid", "createdon" ));

 

This brings back every items with the crf0b_masterid column being populated with the GUID of the Master Record.

 

But...when I filter the collection to only see the comments associated to that gvID

      Filter(colObservations, gvID = crf0b_masterid );

It shows all records, no filtering is being done.

 

I get no errors on the syntax.  It looks good to me.  Do you see anything that I am missing?

  • Verified answer
    phillippoole Profile Picture
    85 on 08 Jun 2023 at 15:22:58
    Re: Trying to filter a collection by GUID and it always shows all results

    Here is my fix, not sure why this worked and the other didn't:

     

    ClearCollect(colSKProducts, ShowColumns(Filter('SK Products 1S', crf0b_masterid = gvID), "crf0b_productamount", "crf0b_productdetails", "crf0b_productquantity", "crf0b_masterid", "crf0b_productname", "createdon" ));

     

    Embed the filter in the ClearCollect, don't filter a collection afterward.

  • SudeepGhatakNZ Profile Picture
    14,381 Most Valuable Professional on 08 Jun 2023 at 00:23:34
    Re: Trying to filter a collection by GUID and it always shows all results

    Try

     Filter(colObservations, crf0b_masterid = gvID );

     

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