cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
theisogunro
Helper IV
Helper IV

DropColumns from collection with retrieved data from a list

I have a SharePoint list that I add to a collection in my PowerApps.  Unfortunately, there are about 15 columns that I don't need.  I tried using DropColumns() to remove unneeded columns but that didn't seem to do anything.  Here's what I added in my OnStart:

 

ClearCollect(salesCollection, Sales);
DropColumns(salesCollection,"Author");

 

When I look at my collection, Author still exists.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@theisogunro 

DropColumns is a function that returns a table of records with the column dropped.  You are not applying the output of the function to anything.  It does not alter an existing table.

 

Your formula should be:

ClearCollect(salesCollection, DropColumns(Sales,"Author"));

 

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

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@theisogunro 

DropColumns is a function that returns a table of records with the column dropped.  You are not applying the output of the function to anything.  It does not alter an existing table.

 

Your formula should be:

ClearCollect(salesCollection, DropColumns(Sales,"Author"));

 

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

Makes sense. Thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,886)