cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Release 3.20013.29: new problem with AddColumns and ShowColumns working together

As of release 3.20013.29 there is a problem with AddColumns and ShowColumns working together on a table based on a connection (either the connection directly or a local copy).

 

If I use ShowColumns to limit the columns in the table, but then use AddColumns to add a column with the same name as one of the columns that have been suppressed by ShowColumns, I now get an error which I didn't before.

 

So if an incoming connection is called, say, dbo.MyTable, with columns "ID" and "Data", this used to work:

AddColumns(
  ShowColumns(
    '[dbo].[MyTable]',
    "Data"
  ),
  "ID",
  0
)

but as of 3.20013.29 I get wavy lines and the error "The function AddColumns has some invalid arguments. A column named "ID" already exists".

 

This doesn't work either:

AddColumns(
  DropColumns(
    '[dbo].[MyTable]',
    ID"
  ),
  "ID",
  0
)

 

Nor this:

AddColumns(
  RenameColumns(
    '[dbo].[MyTable]',
    "ID",
    "SomethingElse"
  ),
  "ID",
  0
)

 

(yes this is obviously a trivial example, but I have apps which use ShowColumns/AddColumns a great deal to transform data, and rewriting them all would be a major headache if this is now a permanent change)

3 REPLIES 3
Highlighted
Advocate I
Advocate I

Re: Release 3.20013.29: new problem with AddColumns and ShowColumns working together

I'm experiencing the same thing. I'm needing to rename a bunch of columns and references right now.

Highlighted
Frequent Visitor

Re: Release 3.20013.29: new problem with AddColumns and ShowColumns working together

We are facing the same issue. Didn't happen in the past. Can Power Apps team fix this problem asap. Based on the documentation, "The ShowColumns function includes columns of a table and drops all other columns." So we should be able to AddColumns with same column name since logically the columns no longer exist in the table.

Regular Visitor

Re: Release 3.20013.29: new problem with AddColumns and ShowColumns working together

Same error, not sure if it is the same problem.  In my case after clearing collections they still exist and have all the columns, just no records (even after closing the app!!!) 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,647)