Update Shared Column on Document Set creation

hi,
I have a cloud business app connected to sharepoint online,
on certain actions i create a document set in a sharepoint library , the document set i use has a shared column set - i would like to set this value at creation time or just after creation so that any documents added inherit the value.
from the cloud business app i am using the CSOM to create the document set (based on steven curran's post
http://sharepointfieldnotes.blogspot.com/2010/06/making-your-sharepoint-2010.html)
Any ideas?
Thx

Hi mrP,
According to your description, my understanding is that you want to update the shared column on document set creation.
I suggest you create a workflow to do it.
You can create the workflow as the below:
For the workflow Start Options, select “Start workflow automatically when an item is created”.
After the above, publish the workflow.
Best Regards,
Wendy
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • External data column as shared column in document library with document sets

    Hello,
    I'm using a document library with document sets. Within this document library i have a External data column called "Project"
    This column has it's columns:
    Project: Installatietype
    Project: Relatie
    Project: Object
    Project: Projectleider
    Project: Status_project
    I wan't to use the external data column as an shared column for my document set(s). But i can't figure out or this is possible.

    Hi,
    According to your description, my understanding is that you want to set the external data column as a shared column in document set content type.
    I tested the same scenario in my environment, and the external data column was not supported to be set as a shared column in document set.
    Here is a similar thread for you to take a look:
    http://social.technet.microsoft.com/Forums/en-US/5488b777-1c18-4895-a264-27802b2cde27/document-set-shared-columns-and-bcs-data?forum=sharepointgeneralprevious
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Document Set Creation in document library using REST API in Sharepoint 2013

    Hi,
    I want to create the document set using REST API call. Currently i am able to create the folder and able to upload the files using REST API's in the document library. Is there any way we can pass the contentype name or Id and create the document set using
    REST API call. We need to create the document set along with metadata and upload the files inside the document set.
    I need to create the document set along with meta data column values using REST API. Please let me know how we can achieve this through REST API.
    Thank you,
    Mylsamy

    Hi,
    According to your post, my understanding is that you wanted to create document set along with managed metadata fields.
    The REST API does not currently support working with Managed Metadata or Taxonomy fields.
    As a workaround, we can use the JavaScript Client Object Model.
    Create document set using JavaScript Client Object Model.
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/aacd96dc-0fb2-4f0d-ab4c-f94ce819e3ed/create-document-sets-with-javascript-com-sharepoint-2010
    Set managed metadata field with JavaScript Client Object Model.
    http://sharepoint.stackexchange.com/questions/95933/add-list-item-with-managed-metadata-field-through-jsom
    http://sharepointfieldnotes.blogspot.com/2013/06/sharepoint-2013-code-tips-setting.html
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • How to hide a column from document set?

    I have a document set in which i want to hide one of the columns, how do i proceed? is there any out-of-the-box features available? I want to show the column in main library view but not in document set. Any suggestions would be appreciated.
    Thanks
    Ramanjulu Naidu N

    You can hide the column in the content type to stop it showing in forms.
    Or you can go into Document Set settings (via the library settings page) to stop it being displayed on the Document Set homepage. 
    Does this cover the hiding you wanted to do?
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • UPDATE multiple columns with conditional SET parameters

    I have a procedure that updates multiple columns of a table using the procedure's parameter. Is it possible to have one update statement with conditional SET parameter?
    CREATE TABLE TEMP
    (POL_NUM NUMBER,
    OED DATE,
    TERM NUMBER,
    TRANS_CD CHAR(2));
    INSERT INTO TEMP VALUES (1, '1 AUG 2009', 12, 'NB');
    INSERT INTO TEMP VALUES (2, '4 AUG 2009', 12, 'XL');
    INSERT INTO TEMP VALUES (3, '2 AUG 2009', 12, 'RN');
    COMMIT;
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM NUMBER,
      pOED IN DATE,
      pTERM IN NUMBER,
      pTRANS_CD CHAR2)
    AS
    BEGIN
      IF pOED IS NOT NULL THEN
        UPDATE TEMP SET OED = pOED WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTERM IS NOT NULL THEN
        UPDATE TEMP SET TERM = pTERM WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTRAN_CD IS NOT NULL THEN
        UPDATE TEMP SET TRANS_CD = pTRANS_CD WHERE POL_NUM = pPOL_NUM;
      END IF;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
         NULL;
    END;Is it possible to replace multiple IFs from the code to have only one UPDATE statement with condition that update the column only if the passed parameter is not null? In real scenario I have more than 3 columns and I don't want to write many IF blocks.
    Please help Gurus!!
    Edited by: Kuul13 on Sep 18, 2009 1:26 PM

    Hi,
    You certainly don't want to issue separate UPDATE statements for every column; that will be really inefficent.
    SQL has several ways to implement IF-THEN-ELSE logic. CASE is the most versatile, but NVL will do everything you need for this job. You can use one of those to set a column to itself (and therefore not really update that column) when appropriate.
    For example:
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM   IN       NUMBER,
      pOED          IN   DATE,
      pTERM          IN   NUMBER,
      pTRANS_CD  IN       CHAR
    AS
    BEGIN
         UPDATE  temp
         SET     oed      = NVL (poed,       oed)
         ,     term      = NVL (pterm,       term)
         ,     trans_cd = NVL (ptrans_cd, trans_cd)
         WHERE     pol_num      = ppol_num;
      COMMIT;     -- Maybe
    END    tmp_proc;"EXCEPTION WHEN OTHERS THEN NULL" is almost always a bad idea. If there's an error, don't you want to know about it? Shouldn't you at least log a message in a warnings table or something?
    Think careflully about whether or not you want to COMMIT every time you call this procedure.
    Just as it's inefficient to issue a separate UPDATE statement for every column, it's also inefficient to issue a separate UPDATE statement for every row. If efficiency is important, it should be possible to UPDATE several rows in a single UPDATE statement, using NVL (or CASE, or COALESCE, or NULLIF, or NVL2, or ...).
    This was a very well-written question! Thanks for providing the CREATE TABLE and INSERT statements, and such a clear explanation.

  • Updating library column with Term Set Term description

    Hi Community,
    We are busy with a Document Management project using drop off libraries to file documents (docs) based on classification by a single level Term Set (example: "1000" (name) & "Client XYZ" (description)). Then auto
    create folders each time there is a new classifcation,i.e. term, used (example "1000 - Client XYZ").
     The challenge we have is that auto folder creation is not allowed on term sets, thus we want to strip out the term name (1000) and the corresponding description (Client XYZ) to 2 seperate text fields and then concatenate them to become
    an unique text field ("1000 - Client XYZ".) that can be used for the autocreation of folders in the library.
    Does any one now how this can be acheived or maybe even suggest a better approach?
    Kind Regards
    Philip

    I dont think with OOTB setting it can be done, however the logic which are explaining of concatenation could be done in custom code, what you need to do is as soon as a  document comes to drop off library on the item added event you can perform this
    operation to create a folder
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • Sharepoint Online Bug: Document Set does not synchronize empty fields

    If in the properties of document set the general field is empty, it will not be synchronized with internal files that has this general field. Ie, all files can have own values for the general field. If the value in document set (in properties) is not empty,
    the synchronization works fine. This issue was tested in different sites from different account in Office365.
    How to reproduce the problem:
    1. In Document Set (DocSet1) I have general field (Field1).
    2. When I create DocSet1 item in the list, Field1 is empty.
    3. In DocSet1 I create file Doc1, also with Field1.
    4. Field1 in Doc1 and DocSet1 has to be synchronized (because it's general).
    5. When I change Doc1 file, put some text (Text1) for Field1,
    the value remains as
    Text1, but in that time Field1 in DocSet1 is empty.
    6. Field1 wasn't synchronized, it has different values in DocSet1 properties and in internal file Doc1.
    7. I go to DocSet1 and change Field1 to Text2, now the field is synchronized
    8. Field1 in DocSet1 and Doc1 is Text2.
    Why does it happen?

    Hi  ,
    According to your description, my understanding is that the updated Shared Column of   document item cannot synchronize with the Shared Column of the Document Set which is empty value.
    For reproduce your issue, I added two Shared Columns  “Description” and “E-Mail”  into my Document Set Content Type and added it to a document library . Then I created a new Document Set and left
     its two Shared Columns  “Description” and “E-Mail”  empty. When I created  a document item in the new document set and set values to the two Share Columns, the Description column was still empty but the “E-Mail” column was updated with
    new value.
    By default, if the Shared Column of  your Document Set  is empty, the Shared Column of the items in the document set should be empty and cannot be updated.
    For a good practice, I recommend  that you can set the value of Shared Columns in your document  set once your document set is created . For a workaround, you can hide Shared Column in the Edit
    Form. Here is the code you can refer to:
    <script type="text/javascript">
    $(document).ready(function(){
    HideFieldByInternalName("Coach");
    HideFieldByInternalName("Duration");
    HideFieldByInternalName("Locations");
    function HideFieldByInternalName(internalName) {
    $(".ms-formbody").contents().filter(function() {
    var regExp = new RegExp(internalName, "i");
    // match comment node containing internal field name
    return ((this.nodeType == 8) && (this.data.match(regExp)));
    }).parent().closest("tr").hide();
    </script>
    Reference:
    http://en.share-gate.com/blog/document-sets-making-your-metadata-shine
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • SharePoint 2013 List & linked Document Set Project Help Needed

    I have struggling to find the best solution for a recent project. I'm sure someone will have a better suggestion than what I have come up with.
    Project Requests
    Project Tracking and Documents
    Status and other data
    Project Documents
    Offsite Syncing for active projects (SkyDrive Pro)
    Attempted Scenario
    1 List for Project Tracking
    1 Document Library for Project Documents (Document Set content type)
    I created a workflow to automatically create a new Document Set when an item was added to the list, then create a link to the Document set in a column called Documents. The goal with the document sets is to have them sent to another library (archive) when
    the project is marked complete. The reason is so that the user synching offline won't have so many document sets to sync or to browse through (there would easily be a few hundred within a couple of months)
    Is there a way to programmatically move the document set to an archive library when the list item status is set to complete?  And if the status were to change back to active, to move back to the active library. 
    Or maybe I am going about this the wrong way entirely?  All suggestions are greatly appreciated! 

    Hi,
    With Event Receiver, we can capture the ItemUpdated event of item of a list when the value of an item is updated, then perform the Document Set moving accordingly.
    Here is a step by step sample on creating a simple Item added event receiver for Custom List in SharePoint 2010:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    More information on
    Event Receiver for your reference:
    http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/ff408183(v=office.14).aspx
    Here is a thread with code demo about
    moving Document Set programmatically:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/1e8b1110-a719-4825-a300-cc1946f4d96a/document-sets-move-programatically
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Unable to edit Document Set metadata.

    I have a Library with Document Sets enabled.  The metadata for the documents and the DS are defined and the columns visible (set to optional) from within each content type under library settings.  However, when I select a DS and then click Edit
    Properties, I can only change the DS Name and the Content Type (DS or Folder).  None of the other metadata from the DS content type is visible.  The extra metadata shows when I create a new DS item, but there is no way to change it after the fact.
    Anyone have any ideas?

    It is possible to make it do that but i can't imagine how it could happen without sigificant deliberate effort.
    It is possible to modify the columns on a content type so that they do not appear on specific views (view,new,edit) but it's a fairly obscure trick and you need PowerShell to do it. If this has happened then you could use PowerShell to correct the settings
    but i dislike treating the symptoms of a problem unless you know the cause.
    There are some columns that are set by default to only appear on set views but that would normally affect the items as well as the document sets.
    For a random thought you could look at the effectts of seting the columns to be shared throught the document set, it's possible that i've forgotten a bit of default behaviour and that the columns are being hidden on purpose. Other than that i'm out of ideas
    i'm afraid. Hopefully someone else may be able to contribute.

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • Transfer changes from Document to the Document Set [Sharepoint bug?]

    I I have Document Set, 1 Document inside and, for example,
    1 general field.
    Task: when I change Document I need to copy value of the general field to the Document Set.
    Problem: I made Workflow on Document that calls when I change it, this Workflow copies data to the Document Set.
    But it doesn't work, because when I change Document inside Document Set there are 2 events: "Document was changed" and "Document Set was changed". And the event "Document Set was changed" called first and it copies all general
    fields to all documents inside. That's why when my Workflow starts, field in Document has value from Document Set not the one that user typed.
    Any solutions to solve the task or problem (e.g. to increase the priority for Workflow on documents inside)?

    Hi ,
    According to your description, my understanding is that you want to copy the value of a field for a document inside a document set to the associated column for document set.
    How did you design your workflow?
    I did a test based on your description, and I used the ID (in my testing, the ID of the document set is 2)to find the associated document set, and the testAA is the column.
    My workflow is:
    In my testing, everything was ok. Please have a try as the above workflow, compare the result.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Note Board web part to display comments for explicit Document Set

    I guess my question falls under 'Other customization' hence my post here.
    Scenario:
    I have a Document Set content type enabled for a library. At the moment I have a few "folders" [document sets] that contain their respective documents.
    I edited a Document Set welcome page to include a Note Board web part. I edited the Note Board web part by adding a 'URL for note' to be a URL of a random Document Set welcome page while in edit mode.
    (Basically, I went to a 'ABC' document set page, clicked edit page, copied URL from address bar, closed that page, went to 'Customize Welcome Page' for all document sets in that library, edited Note Board web part by pasting the link into its 'URL for note'
    field) 
    Problem:
    Currently, all comments are shared between all document sets (folders). When I go to 'ABC' document set and post a comment, I can see my ABC specific comments in e.g. 'XYZ' document set.
    I want to have comments specific to each document set displayed on a respective page for that document set.
    Solution?
    I realize that I must have gotten an URL for a Note Board web part wrong and it does not filter comments explicit to each document set but fetches the comments from whole the library. My url is currently:
    https://intranet.domain/sitecollection/library/Forms/Machine%20Process%20Pack/docsethomepage.aspx?ID=2&FolderCTID=0x0120D520009EDF2E3A3112B041AC6EC1D4133D77550000C297D6CB32E349A435E04924DC6C58&List=7b052f9c-7e35-4251-b66d-3bcdd2950014&RootFolder=%2Fuk%5Fqhse%2FProcess%20Packs%2FSigma%202345&RecSrc=%2Fuk%5Fqhse%2FProcess%20Packs%2FSigma%202345&PageView=Shared&InitialTabId=Ribbon.WebPartPage&Visi
    I know I have to strip this URL from some parameters, presumably leaving just ID, FolderCTID, List and RootFolder.
    Could someone actually tell me exactly how my URL should look like if I want to display comments only for a given document set on its welcome page?
    Thanks!

    Hi,
    According to your post, my understanding is that you wanted to display comments only for a given document set on its welcome page, not display for all the document sets.
    If so, you should not set the “URL for note” field in the Note Board web part, you can just leave it blank, then when you post a comment in one document set, the others would not display the comment.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Create document set using ECMA Script

    Hi,
    I want to create a document set in SharePoint 2010 document library where i have already included document set content type.
    Is there any way to create a document set using ECMA Script?? If yes, then please provide the sample code for this...
    Thanks.
    -Prashant

    Hi Prashant,
    Although this post is aimed at SP 2013 and the App model, it should give you the object model references you need to complete your goal:
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    In particular the following function should be of use:
    function CreateDocumentSet() {
    var ctx = new SP.ClientContext("http://yourSharePointSite");
    var parentFolder;
    var newDocSetName = $('#txtGetDocumentSetName').val();
    var docSetContentTypeID = "0x0120D520";
    var web = ctx.get_web();
    var list = web.get_lists().getByTitle('DocSetLibrary');
    ctx.load(list);
    parentFolder = list.get_rootFolder();
    ctx.load(parentFolder);
    var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);
    ctx.load(docsetContentType);
    ctx.executeQueryAsync(function () {
    var isCreated = SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
    ctx.executeQueryAsync(SuccessHandler('Document Set creation successful'), FailureHandler("Document Set creation failed"));
    }, FailureHandler("Folder loading failed"));
    ctx.add_requestSucceeded(function () {
    $('#txtGetDocumentSetName').val('');
    alert('Request Succeeded');
    ctx.add_requestFailed(function (sender, args) {
    alert('Request failed: ' + args.get_message());
    // Failure Message Handler
    function FailureHandler(message) {
    return function (sender, args) {
    alert(message + ": " + args.get_message());
    // Success Message Handler
    function SuccessHandler(message) {
    return function () {
    alert(message);
    Keith Tuomi | Twitter: @itgroove_keith | Blog:
    http://yalla.itgroove.net
    Please click "Propose As Answer" if a post solves the problem or "Vote As Helpful" if a post has been useful to you.

  • Update Changed Columns Only

    How to generate a form with a data block with the "Update Changed Columns Only" property set to "yes" from Designer 9.0.4.6? Is there an equivalent for this property in Designer? Or do I have to create a library object which I then have to subclass from?
    Thanks in advance
    Gerald

    Hi Gerald
    When you look in the help of Designer (Generated data block properties (implicit/explicit)), the Forms property "Update Changed Columns Only" is not mentioned. That implies that there is no property/preference in Desinger that will influence the value of this Forms property.
    So yes, you have to create a library object and subclass from it.
    Another solution is to work with the Forms built-ins GET_BLOCK_PROPERTY and SET_BLOCK_PROPERTY in a Pre_Form trigger, but I personally would prefer a new library object for this.
    Kind regards,
    Lennart de Vos

  • Document Set shared columns not propagated to documents newly added

    I have a Document Set with shared Managed Metadata and Person fields.
    I have found that sometimes some managed metadata fields are not propagated to newly added documents using drag and drop with Windows Explorer.
    [ Note : Sharepoint 2013 with SP1 ]
    Example
    Field A = Person or group (optional)
    Field B = Managed Metadata (optional)
    Step 1 :
    I create a new Document Set (lets call this one docset X), with field A empty and field B with a value.
    I save this docset then open the document library in Windows Explorer and finaly, drag and drop a document inside the folder of this newly created docset.
    When I look at the properties of the document, I found that there is no value in the field B even if it's not the case of the docset.
    Step 2 :
    I create another Document Set (lets call this one docset Z), and add a value inside field A and field B.
    Again, I save this docset then open the document library in Windows Explorer and finaly, drag and drop a document inside the folder of this newly created docset.
    When I look at the properties of the document, I found that there is a value in the field B and in the field A.
    Conclusion
    So it seems that the propagation of field B depends on if there is a value inside field A.
    It does not make sense.
    Any ideas ?

    Hi vinz,
    I tried many times and couldn't reproduce your issue in my environment(SP 2013+SP1), manged metadata field value in Docuemnt Set content item always could be propagated to documents dragged/dropped in this doc set folder via Windows Explorer regarding
    other fields value.
    You may try to test on other lists, site collections or web applications (may also test with new manged metada term store), see if this issue could be reproduced or isolate, the manged metada column value shouldn't be depend on other column value.
    Also check ULS log, see if there is any related error message generated when the document is dragged to the library windows explorer with this issue.
    http://blogs.msdn.com/b/opal/archive/2009/12/22/uls-viewer-for-sharepoint-2010-troubleshooting.aspx
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for