Filling a content type field from an existing list

I have a question about populating a new document with data from an existing list.
We have a list with customers containing the name, address and email for every customer.
I created a document library for letters and invoices with a document type connected to it. The document type uses a site column with a lookup to the customer name.
In the document template I created the field corresponding to the customer name, so if it is changed in the DIP the customer name shows in the document itself.
My challenge is that I would like to also fill in the address and email automatically for the customer name that is chosen.
When I created the site column I was able to select 'add a column for these extra fields' so I am able to put them in the template, but they will not auto fill.
Is this even possible?

Hi,
I got the same result as yours, and I don’t think we can display the additional fields in the DIP (as I don’t support Office, I’m not sure it).
They are all belong to the lookup column, we could not fill any values.
Just as we upload a file into the library, it also not display the additional fields.
What’s more, if it could display the additional fields in the DIP, we also could not add any values to the additional fields.
But, although the additional fields not display in the DIP, but when we select a value from the lookup column, it would auto fill the value for the additional fields in the library when we save the file.
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support

Similar Messages

  • Deleting sharepoint list content type Fields

    Hi
    Please tell me the code for deleting all the fields inside content type fields..This is my code i used,but its not deleting the fields.
     SPSite spsite = new SPSite("http://ghfjhhk18:8001");
                SPWeb web = spsite.OpenWeb();
                web.AllowUnsafeUpdates = true;
                SPList list = web.Lists["Test"];
                SPContentTypeCollection cts = list.ContentTypes;
                SPContentType ct = cts["Item"];
               // ct.FieldLinks.Delete("Expires");
                //ct.Update();
                SPFieldCollection contentTypeFieldCollection = ct.Fields;
                foreach (SPField spField in contentTypeFieldCollection)
                    if (ct.Fields.ContainsField(spField.Title))
                        //SPFieldLink fieldLink = new SPFieldLink(spField);
                        ct.FieldLinks.Delete(spField.Title);
                    //myContentType = null;
                ct.Update();
                web.AllowUnsafeUpdates = false;
            }but this code is not deleting the fields..
    pls help me as soon as possible.
    One friend told me to do for loop in reverse..but how can i accomplish that

    Hi,
    Please refer the below code snippet which may help you to fix your issue. If not please refer the below links also
    http://ptsharepoint2010.blogspot.in/2011/12/programmatically-remove-fields-from.html
    http://www.c-sharpcorner.com/uploadfile/54db21/delete-field-content-type-in-sharepoint-2010-programmaticall/
    using (SPWeb web = site.OpenWeb())
    SPList spList = web.Lists["<ListName>"];
    SPContentTypeCollection spCTS = spList.ContentTypes;
    SPContentType spCT = spCTS["YourContentType"];
    spCT.FieldLinks.Delete("YourField");
    spCT.Update();
    If its not helping you, please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Content Type field

    Is it possible to remove the hyphen between the Type and the Description in the Content Type field?
    Or maybe someone can recommend a good way to utilize it in it's current state. In most cases we currently have something like 'Flowcharts' without a description and it would be nice to be able to remove the hyphen.
    Thanks

    Hi,
    there is a very easy way to do this, without any component:
    Open the ConfigurationManager Applet and select the Views Tab.
    In the Views Tab search for the View docTypes and click Edit
    In the Edit-Dialog Replace the Default Display Expression with
    <$dDocType$> <$if dDescription$>-<$endif$> <$dDescription$>
    The hyphen will only be displayed if there is a Description.
    Greets Thorsten

  • How to get additional field from the second list base on lookup information column ?

    Hi everyone,
    Currently I created a SharePoint hosted Apps project and I need to know how can I get additional field from the second list base on lookup information column. example List1 Have 2 columns column1 and column2(Lookup Information from list2 (category)),
    List2 have 3 columns title, and category, and color.  so how can get the title and color from list2 base on this lookup information column (SharePoint Hosted apps and Javascript code)? that is possible?
    Best regards,
    ------------------------------------------------------------ ---Tola---

    You can build one custom lookup control. Refer to the following post
    http://www.stuartroberts.net/index.php/2012/10/03/enhanced-lookup-field-part-1/
    Alternatively, try the following solution from codeplex
    http://sp2010filteredlookup.codeplex.com/
    http://filteredlookup.codeplex.com/
    --Cheers

  • Can I add Custom Content Type created programmatically to Custom List Definition?

    I have created Custom content type programmatically in the Feature Receiver. Followed by this have another feature which creates List Template. I want to add the custom content type to the list template.
    Using VS 2012, I added the custom content type to the list definition. The Schema.xml for the list definition looks as below:
    <ContentTypes>
    <ContentTypeRef ID="0x010100D7D9F4B1F4A9684BB44389571024B2EC00C393BB21B8AD7B41B62A87DF0501504D" />
    </ContentTypes>
    ID was automatically added by the VS tool.
    List Template is created, the new content Type is also added, but the Name is displayed as "Document" instead of the custom content type name. So I see two CTs with the name "Document".
    How can I achieve this? Any help is appreciated.

    Hi,
    Please add EnableContentTypes="TRUE" in the <List > tag.
    The following materials would be helpful:
    How to add custom content type to a custom list
    http://innersharepoint.blogspot.de/2009/10/how-to-add-custom-content-type-to.html
    SharePoint Custom List Definition with Content Type
    https://achrafsp.wordpress.com/2013/03/31/sharepoint-list-definition-with-content-type/
    Create a Custom SharePoint List Definition
    http://www.mssharepointtips.com/tip.asp?id=1188
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Error while adding content type fields in the EditForm.aspx for an customlist item.

    This is office 365. I have content type which is attached to custom list.
    Added new site column "CustomerAction" which was added to Content type, now when I added this field in the EDITForm.aspx using the SharePoint designer, this form is called when the custom list item is being edited.
    But when I added this extra field to EDITFORM.aspx it is giving error,. the standard correlationid error.
    Can anyone suggest, what could be problem !
    Thanks
    Labhesh
    Labhesh Shrimali

    Hi Labhesh,
    When we add the site column to the content type, there is an option to update the all
    content types which inheriting from this type.
    If we set this to Yes, then the site column will be added to the list where the content type or its child content type has been used and this column will be added to the EDITFORM.aspx too.
    So we don’t need to re-add this site column to EDITFORM.aspx.
    Thanks,
    Victoria
    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]
    Victoria Xia
    TechNet Community Support

  • Delete a content of field from a database table

    Hi All,
    i want to delete a content of field mtart from mara where matnr = 0000001.
    plz help me out  ASAP plz also provide a piece of code for doing so....
    Thanks and Regards.
    Ashu Singh.

    Hi,
    You Can Do Like This,
    Parameters p_matnr type mara-matnr.
    Delete from mara where matnr eq p_matnr.
    Try This

  • Assigning External content type field column value using Client Object Model

    I have a problem assinging External column value to ListItem object with client object model-based application I'm developing. To be precise, I am able to retrieve data related to external content type by reading external list created from this content type
    but I don't know how to properly use it to assign value to this field. By doing some research on my own I concluded that BDC ID column from external list is the way to go since it uniquely defines selected row from external list but that doesn't
    tell me much since I don't know what to do with it. Currently I ended up with partial solution - to assign plain string value of picker column but that makes this value visible only in "View Properties" option on Sharepoint and not in "Edit Properties"
    which pritty much makes sence since it isn't properly related to rest of the data in specific row. Does someone have a better solution for this?
    Igor S.

    I think I understand your problem.
    In my example I have an external data column "Beneficiary Name", using a Beneficiary external content type (accessing a table of beneficiaries in a SQL table).
    I want to set the "Beneficiary Name" property using the client object model. I know the name of the beneficiary but not the ID value.
    It is a fairly simple solution. You just need to identify the name of the property SharePoint assigns to the ID field, in my case it is called "Beneficiary_ID". Then set the two properties as follows:
    thisItem["Beneficiary_Name"] = "Charitable Trust";
    thisItem["Beneficiary_ID"] = -1;
    thisItem.Update();
    Setting the ID property to -1 causes the server to do an automatic lookup for the ID from the value assigned to the item.

  • Programmatically Hiding a Content Type Field

    Here is my scenario,
    I have 2 content types (CT1 and CT2). CT2 is created programmatically using PowerShell by the lines of code given below,
    $CT1= $spWeb.ContentTypes["My Content Type 1"]
    $CT2 = $spWeb.ContentTypes["My Content Type 2"]
    if($CT2 -eq $null)
    $CT2 =New-Object Microsoft.SharePoint.SPContentType -ArgumentList @($CT1, $spWeb.ContentTypes, "My Content Type 2");
    $CT2.Group = "My Group";
    $CT2.Description = "Some Description for CT2.";
    $spWeb.ContentTypes.Add($CT2);
    I want to hide some of the columns that I inherited from CT1 in CT2. When I use the below code for hiding columns, I get 'Exception setting "Hidden": "Cannot
    change Hidden attribute for this field"'
    <pre lang="x-powershell">$field = $CT2.Fields["MyField"] #MyField - I want to hide this field
    $field.Hidden = $true;
    $field.Update()
    After I looked deeper into the problem, I found that, CanToggleHidden property for the field is set to 'False'. Hence, I decided to change the flag using reflection by using the lines below,
    $field = $CT2.Fields["MyField"] #MyField - I want to hide this field
    $bindingFlags = [Reflection.BindingFlags] "NonPublic,Instance"
    [System.Type] $type = $field.GetType();
    [Reflection.MethodInfo] $mdInfo = $type.GetMethod("SetFieldBoolValue",$bindingFlags);
    $object = [System.Object] @("CanToggleHidden",$true);
    $mdInfo.Invoke($field,$object);
    $field.Hidden = $true;
    $field.Update()
    This time, I did not get error at $field.Hidden but at $field.Update() method call, I get 'Exception calling "Update" with "0" argument(s): "This functionality
    is unavailable for fields not associated with a list."'
    Suprisingly from UI (Site Settings -> Site Content Types), I can browse to 'CT2' content type and hide columns that I don't want!!!!
    My questions is, Is there a way to hide unwanted columns programmatically?
    SSK

    You should reference the field you want to hide not from the Fields collection, but from the FieldLinks one.
    Try to change powershell string:
    $field = $CT2.Fields["MyField"]
    to this one:
    $field = $CT2.FieldLinks["MyField"]
    After it, the script should work without exceptions.

  • List field vs. Content Type Field - Powershell

    Hello,
    We have a bunch of document libraries where we have a List Column that contains information.  We have recently added a content type to the libraries and would like to copy the information from the List Column to a field in the content type.
    How do I use powershell to refer to these fields?
    If I have the Document Library (List) as a variable $list then I assume that I refer to the field as $list.$column.  But how do I do the same for the document?   How do I iterate through each document in the library to accomplish the same thing
    with a for loop?
    Something like:
    $list = $web.GetList("My List Name")
    foreach ($document in $list)
    $document.Fields["Document Field"] = $list.Fields["List Field"]
    $document.update()
    Any help would be greatly appreciated,
    Matt

    your code should be similar to
    $web=Get-SPWeb http://your_site_url_here
    $list=$web.Lists["List_Name_here"]
    foreach($item in $list.Items)
    #your logic here
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

  • InfoPath 2010 - How to connect to another content type form from the current form with a click of a button?

    I have two different form library forms for each different content type published to the same Form Library.  I like to know if by a click of a button, if I could close the current form and jump to the next and vice versa? If so, what steps
    would I need to take using OOB technology?
    Thank you,
    SRAEngineer

    Hi Guru:
    Thanks.  However, the Views do not work in my case, as one form has different required fields than the other and set of fields also changes a bit for each form.
    However, researching more I have been able to find the solution since I posted this request.
    I will try to describe the Solution:
    First I deployed both the forms to a SharePoint Form Library. Then I opened the template from the advanced settings and copied the URL from the top search box of IE.
    Went back to the design view of the form, highlighted the writings/title of the form and right clicked to paste the hyperlink.
    Quick published it again and now the hyperlink is working active/live in the deployed form as well and doing its job to get to the next form. I repeated the process to the other form to do a toggle.
    Thank you for your input though.
    Regards,
    SRA
    SRAEngineer

  • How to read the content from a External Content Type with out creating External List in Sharepoint 2013?

    Hi,
    I have a requirement to read the External Content Type and storing the Data in a Session Variable. The Reading of the content from External Content Type with out creating a External List.
    Please help I am trying to find the solution, but unable to do that.
    Thanks,
    Pradeep

    Hi,
    Firstly an external content type designed to work with SharePoint list and there is no way to read apart from this.
    If you are looking the solution out of the " Business Connectivity" then find that data source has been exposed through WCF and  Web Service ?
    So you can use REST API and CSOM to consume those data in SharePoint.
    You can also leverage the ADO.NET option if the datasources based on MS technologies.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • Required field in custom content type not required in custom list instance

    I have an issue with a custom SharePoint 2013 solution. Among other components, it consists of:
    a feature with several custom fields with different types, some of which are taxonomy fields,
    a feature with three custom content types using different sets of the custom fields with partially different configuration, e.g. whether they are required or not,
    a feature with a custom document library template and instance using two of the custom content types and a default picture library that is programmatically customized when the feature is activated, e.g. it is assigned the third custom content type.
    When deploying the solution and activating the feature, everything is set up correctly except a single taxonomy field for one of the doc lib's content types. It is defined to be required in both content types but indeed it does not show up as required for
    the default content type whereas everything works fine for the other. And it does not matter which of the two custom content types is defined first (= default) in the list template's schema.xml, the issue always occurs for the same taxonomy field in the doc
    lib's default content type. When I use the built-in Document content type as default, the field is required for both custom content types. However, using the Document content type is not an option.
    If you think this behavior is not strange enough: When the list content type's field is set required through the SharePoint UI, it becomes optional again when the list column is updated, e.g. its display name is changed.
    Any ideas?

    Hi,
    Thank you for your question.
    We are currently looking into this issue and will give you an update as soon as possible.
    Thank you for your understanding and support.
    Linda Li                
    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]
    Linda Li
    TechNet Community Support

  • How to update content types enheriting from the System Page Content type

    After importing a design package I found out that my content types was missing some columns. I could add the missing columns to my "page" and "Article Page" site content type. When adding the exisiting columns I could choose to update
    everything that inherits from this type:
    This is working. However I still miss 2 columns in the "Page" Content type:
    1. Rollup Image
    2. Hide physical URLs from search
    If I roll back my dev environment I can see that these are inherited from the "System Page" content type which is not editable. The columns are in the "System Page" content type but They are gone in "Page" content type that
    should inherit the columns.
    So how do I update these?
    Thanks

    Hi Alex,
    Thank you for replying. I totally agree with you regarding not to modify the OOB content types. The content types I have created/modified is also my own "new" content types.
    However the designpackage import messed up the OOB content types somehow so I'm only trying to get back to the state before the import. The only thing I see is still missing is the two previously mentioned columns in the "page" content type.
    Do you have any other suggestions in how to get back to the "OOB State"?
    Thank you
    Update: this is my page content type. It's not set to read only so it should update the last two missing columns from its parent (system page content type) right?

  • Choose a content type when creating a new list item

    Hi,
    I would like to know if there is a way how to change the "New" link in a SharePoint list.
    Problem:
    I have a list with free content types. If I click an existing item a form appears where I can change the content type. But if I create a new item by click the "New" link (directly to the link, not to the little arrow), I am automaticly creating the default content type (the first one).
    This is confusing for users. Can I change it so a user can choose a content type after he or she clicks the "New" link?
    Thanks for any advice.

    Hiya,
    I have a solution!
    If you have three set content types for a list, rather than encouraging people to click the arrow by the new button put three links on a new page that link to the new form for each content type.
    <a href="http://site/Lists/test/NewForm.aspx?ContentTypeId=CONTENTTYPEID1">Create a new item with content type 1</a>
    <a href="http://site/Lists/test/NewForm.aspx?ContentTypeId=CONTENTTYPEID2">Create a new item with content type 2</a>
    <a href="http://site/Lists/test/NewForm.aspx?ContentTypeId=CONTENTTYPEID3">Create a new item with content type 3</a>
    The main problem with this is that if you add new content types to the list, you have to add new links to the page.
    Mike
    The only thing I would add is that, the content type ID is a number (1, 2, 3.....) based on the order that the content types were added to the SP list.

Maybe you are looking for