cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Super User
Super User

Can I not drop and add column with the same name?

Why is this broken?

 

 

ClearCollect(NextDataItems,RenameColumns(FirstN(Filter(temporary_assign_wo,Updated<>2 And !IsBlank(_SNValve)  ),Value(TextInput6.Text)),"SN_List","SN_List_Del"));
AddColumns(NextDataItems,"SN_List","d")

 

 

martinav_0-1633533134791.png

This works fine if I give the new column a different name.

I initially used DropColumns() but it resulted in the same issue.  Renaming it out of the way doesnt work either.

13 REPLIES 13

@WarrenBelz ,

I also have an issue with Patch() with SQL tables.  I also cannot patch from a collection into an SQL table if ANY columns in the collection do not exist in the table.  It will give the error "ColumnName Does not Exist".  Even if I'm not patching to that particular column.  It fails.  This has been a real PiTA! I have blown like 4 days on this now.  I am now going to create ANOTHER collection, specifically created those columns that are necessary to generate SN_List.  Then try to Patch() that back into table.  I'm losing my bloody mind on this.

HI @martinav ,

When you say Patch from a collection, what is the code you are using (in Text please)

WarrenBelz
Super User
Super User

Hi @martinav ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz 

 

Nope, I didnt. I ended up having to make a collection and doing the formulas in a separate ForAll(Collect()) nested function to get it done.  Not my preference, but its a one-off activity, so it was good enough.


Thanks for your help.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,087)