cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iwonder
Continued Contributor
Continued Contributor

ClearCollect Filter Results

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

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

8 REPLIES 8
RandyHayes
Super User III
Super User III

@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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
iwonder
Continued Contributor
Continued Contributor

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!

RandyHayes
Super User III
Super User III

@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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

iwonder
Continued Contributor
Continued Contributor

...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
Super User III
Super User III

@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!

 

😁

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
iwonder
Continued Contributor
Continued Contributor

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
Super User III
Super User III

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
iwonder
Continued Contributor
Continued Contributor

Didn't know I could do that!

 

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

 

tiValue.png

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (57,418)