3

I am trying to copy files from one SharePoint folder to another, using REST API, but I see that although all the files are copied, only some get default value for a particular column, while others do not. I have no idea why.

As seen in the screenshot, only two files get the default value for the columns. enter image description here

EDIT: On a closer look, I found that the new office documents types (.docx, .xlsx, .pptx etc.) get the default values, while the old office document types (.doc, .xls, .ppt) do not get the values.

Also the old office documents get the values only when they are coming from a source folder which already contains the columns in the destination folder.

I am wondering why the old office documents do not get the values and if anything can be done.

Is it a bug in SharePoint Server or am I missing any configuration to make all files work?

1 Answer 1

0

If the source library already defines the same fiels, it means the files also have this property embedded in their binary. So, if the value is empty at the source location, that empty value comes along the file when it's uploaded to the target library, thus overwriting the default value defined there.

2
  • Thank you for your reply! My question is I am trying to move documents, and maybe they come from a source folder that do not contain those columns. If the documents are new ones, they get the value fine, if they are old office documents, then there is a problem! Am I missing any configuration here? that if I do, even the old documents will get the value? or is this a SharePoint bug? (i.e. the old office documents will not get the default value)
    – Puneet
    Commented Jun 21, 2017 at 5:41
  • While that's true generally, I dare to suspect that in this case the pre-2013 version office documents would have had empty metadata fields for the columns in question. In other words, I don't see how this would answer exactly this question.
    – moe
    Commented Jun 21, 2017 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.