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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,262)