cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joseabarriga
Frequent Visitor

Remove a field from a collection

Hi!:

 

Working in my app, for some reason that I can´t figure it out a new field was added to a collection. Even though I made all kinds of "Clear" command, in the Run on Startup, in On visible, saving closing, even not running the app, there still a "sticky" field (image) that I can´t remove. Also, I tried with a different collection and adding them "fake" fields, and after Clear the collection they disappeared.

 

Is there a  command or whatever that we can "destroy" a Collection and recreate it?

 

Thanks in advance!

4 REPLIES 4
eka24
Super User
Super User

If the Collection is taken from a table, try this OnSelect of a collection or Onvisible;

 

ClearCollect (Coll1,DropColumns(Datasource,"ColumnToRemove"))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thks for the response but it did not work since the "ColumnToRemove" is not contained in the Datasource.

 

That is precisely the "rare" thing. 

Please you are supposed to replace ColumnToRemove with the name of the field you want to remove. If the name of the collumn in the Collection is ABC replace ColumnToRemove with ABC.

I don't know the column name that is why I used ColumnToRemove

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-qiaqi-msft
Community Support
Community Support

Hi@joseabarriga,

Could you please share more about this new field? A screenshot will be appreciated.

I have seen your previous issues related to this 'new field'. Do you mean you can not remove the new field from the collection which originally created by Excel table?

If I understand correctly, please remove your current data source whatever it is a custom connector or a collection, please connect to your original Excel table.

Best Regards,

Qi

Best Regards,
Qi

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,349)