cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonathanGibbs
Resolver I
Resolver I

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
CapstoneAdmin
Advocate II
Advocate II

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

CalvinHew
Frequent Visitor

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.

andrejs91
Regular Visitor

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
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 (32,032)