cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
Highlighted
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
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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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