cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidstone Kudo Kingpin
Kudo Kingpin

DropColumn not dropping, trying to copy SharePoint List items

I've got an app that reads a line from one SP List and tries to copy it to another.

 

The easiest way I can see is to Collect the item, and Patch it to the new List.

 

Unfortunately on writing the entry you (predictably) get warning about automated columns like ID, 'Created', etc., so I set about using DropColumns to eliminate those columns from my collection.

 

Not all of those columns are straightforward though - amongst the collected columns is 'Author', which appears to be the 'Created By' entry, which contains multiple columns relating to the ID of the creator. When I drop this column, writing to the List still generates an error, referencing the columns 'within' author, separated by a hashtag. For example, "Author#Claims: The specified column is generated by the server and can't be specified".

 

I've tried to drop those columns as well by using the same # syntax, but that doesn't work.

 

The 'simplest' solution might have been to only collect the columns I needed in the first place, but there are quite a lot of them and I was hoping this would've been quicker! So far, it's not!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
davidstone Kudo Kingpin
Kudo Kingpin

Re: DropColumn not dropping, trying to copy SharePoint List items

In the end I used ShowColumns instead of DropColumns, explicitly listing every column I wanted to include. It took a while, and it feels like a solution that shouldn't have been this hard, but the end result is cleaner.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Re: DropColumn not dropping, trying to copy SharePoint List items

Hi @davidstone ,

 

Instead of using DropColumn function, you could try to make item that you pick from the 1st list shown in the form control. The use Patch to update the a new item to the 2nd list. 

 

Use a formula similar to:

Patch(List2,Defaults(List2),{Title:DataCardValue1.Text, Date: DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0),Choice:DataCardValue11.SelectedItems,...})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
davidstone Kudo Kingpin
Kudo Kingpin

Re: DropColumn not dropping, trying to copy SharePoint List items

In the end I used ShowColumns instead of DropColumns, explicitly listing every column I wanted to include. It took a while, and it feels like a solution that shouldn't have been this hard, but the end result is cleaner.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,881)