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 / ClearCollect Filter Re...
Power Apps
Answered

ClearCollect Filter Results

(0) ShareShare
ReportReport
Posted on by 1,146

Thank you for taking the time to read my question.

 

I'm trying this to see if it works. I do get data in some of my columns but not all my columns and I don't know why

 

ClearCollect(colEditCurveDetails,Filter(tblCurveDetail,CurveID = ThisItem.CurveID));

 

ColumnDataMissing.png

 

The data is there in my SQL Table: tblCurveDetail. 

 

Don't know why it's not in the collection.

 

Thanks

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @iwonder 

    Try to avoid the collections unless you absolutely need them.  Most of the time you do not.  Pretty sure I might have mentioned that in the past.

     

    Collections do not "demand" data unless specified.  Since you are not referencing the other columns in your statement, they will not have values.

    If you are using this formula for an Items property or other direct use other than a collection, it will have values as demanded.  This is a feature in PowerApps called Explicit Column Selection.  It is very helpful for performance in your app and only applies to datasources that support it - SQL does!

    So, if you absolutely cannot avoid a collection because you need an in-memory database, then you will need to take a performance hit on your app and turn off the Explicit Column Selection feature in your advanced settings.

     

    I hope this is helpful for you.

     

  • iwonder Profile Picture
    1,146 on at

    Thank you for the reply @RandyHayes 

     

    Currently I have a gallery linked to tblCurveDetail filtered by CurveID. I want the user to use the Gallery to edit values and then save them. I also have a line chart based on the same. I thought it would be nice to use the OnChange event of the Text Input to update the SQL table, and then see it reflected in the chart. Patching the record to the SQL table takes a bit so there is always a delay.

     

    I thought if I put the record into a Collection then updated the collection instead of the SQL table it would react faster, then the user could save all the changes at once to the SQL table.

     

    I'll avoid the collection then and keep doing what I'm doing.

     

    Thanks!

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @iwonder 

    Think dimensional!!  You can avoid the collection, but have the desired process that you want.

    Consider this...

    - Your Items property of the Gallery is a formula based on your SQL Table.

    - Let users edit the values in the Gallery as needed.

    - Your Chart is based off of the Gallery AllItems ... it will have all the data and the updates.

    - Your submit all at once is based off of the Gallery AllItems as well.

     

    So essentially you have a datasource formula in the Gallery and everything else is based off of the Gallery.

     

    The Gallery control is one of the best controls for this simply because it exposes the AllItems property.  No other control does this, and it is a VERY powerful feature that should be exploited as much as possible.

     

  • iwonder Profile Picture
    1,146 on at

    ...Now why didn't I think of that... 🙂

     

    Maybe one day I'll be able to answer a question on here 😉

     

    Thanks again @RandyHayes 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @iwonder 

    Take a few minutes every now and then and answer a question on the forum.  In other words, figure out how to solve it the best way that you can.  You don't have to post a reply until you feel comfortable.  

    BUT, it will then give you a learning tool to figure out issues and then you have the benefit to see how it goes with any other responses that might come from others.

    Trust me...you will learn a tremendous amount from it.  It's like trying to learn from a test that has all the answers - force yourself to answer the question, then look at the answer and ask yourself why yours is not the same, or congratulate yourself that you figured it out too!

     

    😁

  • iwonder Profile Picture
    1,146 on at

    Hi @RandyHayes 

     

    I'm now trying to link my line chart to my gallery.AllItems.TheField however that doesn't work because when I type in new values in the Text Input of my gallery, I'm not saving the record yet, so AllItems is not changing.  Do I refer to the Text Input instead?

     

    Thanks

     

    Edit:

    Unless you're saying I still save at the OnChange, but make my chart equal to AllItems...

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @iwonder 

    Yes, if you want your chart to change based on the information entered in the Gallery, then you need to reference the controls in the gallery that would contain the values you want.

     

    OnChange is not going to be of value.  The TextInput will have the value you want.  Just reference it from the AllItems.

  • iwonder Profile Picture
    1,146 on at

    Didn't know I could do that!

     

    I'm not getting a number however, just [Control]

     

    tiValue.png

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 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard