none
Column default value of the document in SharePoint 2013 Document library set to blank after second check-in RRS feed

  • Question

  • Hi All,

    I am using "Column default value" settings of the SharePoint 2013 Document library to set "Division" for each document. It works when we upload the new document.However after few check-in of that document, this value set to blank/Empty. I am using this "Division Name" in workflow. Since the division value is reset, SharePoint workflow is not running. Can anyone tell me the reason for this?

    Below is the Version history of the document.


    Appreciate your helps on this.

    Thank you in advance.

    Regards.

    Kajan.


    • Edited by surenkajan Wednesday, November 2, 2016 5:53 PM
    Wednesday, November 2, 2016 5:40 PM

All replies

  • Hi,

    I enable ‘Versioning settings’ for my document library and create one custom column(setting default value for it, check in/out several times) but can’t reproduce this.

    If you disable workflow for your document library, does the issue still exists ?Is any update action in your workflow which case this field updated?

    Best Regards,

    Lee


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, November 3, 2016 2:15 AM
  • Hi Lee,

    Thank you for your reply.

    This is not happening for all check-in and check-out. I also cannot able to reproduce this. This is the Production site, One user got this issue. That is why i am analyzing. In Which scenarios, it will reset to blank/Empty? Is there any way i can set it back in case if it set to blank/Empty?

    I cannot disable the workflow since this is the production site and my workflow does not update any field. The purpose  of this workflow is email notification .


    Thank you in advance.

    Kajan.

    Thursday, November 3, 2016 12:48 PM
  • Hi,

    If you want to revert the value back, you could update the field by Disabling Event Firing on your list item and then revert it back, here is one thread for your reference.

    http://www.c-sharpcorner.com/UploadFile/anavijai/programmatically-disable-event-firing-on-list-item-update-in/

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, November 4, 2016 6:19 AM
  • Hi Lee,

    Thanks for your reply. 

    unfortunately, I cannot use any custom coding since Custom solution is not allowed in my organization. I can only use SharePoint designer for my development. 

    So in that case, only the solution would be update the default value manually when the default value set to blank/empty. Isn't? I thought to send a email notification to SharePoint Administrator who maintains this application when the Default value is set to blank/empty. So that SharePoint Administrator can set relevant value manually. 

    Appreciate your feedback on this.

    Thanks & regards,

    Kajan.

    Tuesday, November 8, 2016 3:18 PM
  • Hi,

    If this field is just used for workflow init and should not be changing, you could consider to set it as readonly.

    Here is sample script for your reference:

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
    #Get the Web
    $web = Get-SPWeb "http://sp:12001/"
    #Get the List
    $List = $Web.Lists["TestReadOnly"]
    #Get the Field 
    $Field = $List.Fields["DefaultField"]
    #Set the field to Read only
    $Field.ReadOnlyField = $true
    $Field.Update()

    Or you could check if Column Validation meet your requirement.

    http://techtrainingnotes.blogspot.sg/2015/10/sharepoint-column-validation-examples.html

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, November 9, 2016 2:07 AM
  • Hi Lee,

    Thanks for your reply. I will try this approach and let you know.

    Regards,

    Kajan.

    Monday, November 14, 2016 2:28 PM
  • Hi,

    Is any update for your issue?

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, November 25, 2016 8:04 AM
  • Hi Lee,

    I am really sorry for the late response. Busy with urgent Production issue.

    If i change this field to readonly as you suggest through Powershell, can i able to set the value to this field when i create new folders in future? 

    Regards,

    Kajan

    Wednesday, November 30, 2016 5:20 PM
  • Hi,

    If you want to change the value for this field in future, you need set the ReadOnlyField property to false.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, December 1, 2016 9:40 AM
  • Hi Li,

    I will not want to change the value of old folders. but i have to set the value for New folder.

    Can set the value to New folder if i change this to ReadOnly?

    Thanks.

    Kajan.

    Thursday, December 1, 2016 6:05 PM
  • Hi,

    I checked in my local, default folder doesn’t include other columns, so the custom column will be not applied to folder, could you explain more detail for your issue?

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, December 2, 2016 1:49 AM
  • Hi Lee,

    1. Content type of my Document library is "Document".

    2. Below are the columns defined in "Document" library

    

    3. "Column default value settings" is being used to set the default value for Division to each folder.

    All the documents uploaded under this folder get this value as default value. Users doesn't have permission to alter this value. Admin user will set this value to each folder for the one time. After that there are no changes to this value. When the new folder is created, admin will do the same steps again.

    It is working for most of the users. But It set to empty/blank for few users. 

    I do not have any idea why this value is reset to empty when few users upload the file?

    I am doing exactly same as below article:

    http://www.sharepointdiary.com/2013/10/column-default-value-settings-in-sharepoint-2013.html 

    Pls let me know if you need detail explanation of this

    Thank you in advance.

    Regards,

    Kajan


    • Edited by surenkajan Friday, December 2, 2016 2:34 PM
    Friday, December 2, 2016 2:16 PM
  • Hi,

    It seems I reproduced this issue. When user upload one document to document library, the default value will be set correctly without issue.

    When he drag the file to SharePoint with the same file and ‘replace’ the document library file, the default value will missing, this is because local file doesn’t include the metadata information, you’d better suggest them not do this.

    Or you could create event receiver to monitor the item updated event, if the value changed, update its’ value back.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, December 5, 2016 2:40 AM
  • Hi Lee,

    Thank you for your answer. I have already informed to users not to drag and drop or not to edit in browsers. They are following below steps:

    1. Checkout the file

    2. Download it to local drive

    3. Modify the document using Excel

    4. Upload it 

    5. check in back

    This steps must be OK. Isn't ? But still few users have this issue. I thought to check the ULS logs for any hints. There might be issues due to client applications (Old version of Microsoft Office). But not sure.

    Unfortunately i cannot use any custom coding (Event receiver) for this task since custom coding is not allowed here.

    Thanks & Regards,

    Kajan.

    Monday, December 5, 2016 4:22 PM
  • Hi,

    May you could consider provider-hosted add-in, this will ‘down’ your event receiver logic to add-in web, it won’t impact SharePoint server.

    You could check below thread for more details:

    https://msdn.microsoft.com/en-us/library/office/fp142381.aspx

    One sample thread for your reference.

    http://www.sharepointpals.com/post/Step-by-Step-approach-to-create-a-Provider-Hosted-Application-in-SharePoint-2013

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, December 14, 2016 9:16 AM