cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IncursioML1
Helper II
Helper II

Collection keeps changing column name

When I exit the Power App altogether, does any collection get deleted altogether?

 

There seems to be something that's happening in which a collection keeps using the name of another collection.

In the below example, the SumOfUsage is from a Filtered SharePoint List in which a field is set up as 'Order Number'.

However, when I create a new collection called CleanUsage, I noticed that even if I use a new naming convention of 

 

 

 

 

RecordType: "Usage,"
OrderNumber: SumOfUsage[@'Order Number'],

 

 

 

 

 

some times PowerApps converts it to this

 

 

 

 

RecordType: "Usage",
'Order Number': SumOfUsage[@'Order Number'],

 

 

 

 

IncursioML1_0-1629984575706.png

 

This results in some funny behavior in the 'CleanUsage' collection in which I get 2 fields of 'Order Number' and OrderNumber.

I thought when I use the assignment of the field name that it should just use that new naming convention that in a new collection?

Maybe the collection isn't being cleared when the app closes?

4 REPLIES 4
RandyHayes
Super User
Super User

@IncursioML1 

Variables (including Collections) do not persist beyond the app session.

Your formula is a little backward, so if you could describe that it is that you're trying to do and what the purpose of a collection is in this case, perhaps I could provide more assistance. 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

There is a collection created from a sharepoint list in which doesn't become record base and has tables within some of those fields since SharePoint has some of that other meta data like GUID, user meta data etc. That forall was just trying to get things into records so that I could ultimately join up 3 sharepoint lists into 1 collection by appending them altogether.  (appending vertically that is with the same field order created from a new collection)

Would you have any other suggestion? Ultimately I just want those 3 sharepoint lists in a collection, but the Purchase one from Sharepoint had to get created into a collection vs. straight SharePoint list due to the record limitation the other two lists don't have the record limitation nuance.

IncursioML1_0-1629992521620.png

 

 

I think I also messed up created the collection initially with the naming convention and have been trying to remove references to that collection to clean up some things.  There seems to be no way to delete a collection object and references vs. just deleted records itself when you have the app open.  

RandyHayes
Super User
Super User

@IncursioML1 

So, the first question I would have then is why a collection?  Are you planning to treat this as an in-memory database?  

Although a collection can take multiple datasource and sort-of combine them together, the schemas are usually all over the place.  Once a collection is given a schema in the designer, it remembers it until the app is closed and reopened, and then the editor will reassess the schema again based on definitions.  The editor is ALWAYS reevaluating schemas based on any changes you make...so, if you make a schema change that you didn't really want...it's too late - the editor has now inferred the schema and will not let that go until you exit and reenter. It's quite a pain!  That's why personally, I like to have a well defined schema - in the case of an underlying datasource, that is the schema...when combining datasources, I opt to define the schema so that all sources match the same schema.

 

So, perhaps I can shed some help on the overall scenario with some answer to - what is the purpose of the collection and why a collection?

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

The collection is to display data in a tabular format - I'd rather not have a gallery.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,041)