cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidstone
Level 8

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
davidstone
Level 8

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 Team
Community Support Team

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.
davidstone
Level 8

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,970)