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

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

  • 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

  • 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

  • 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

  • I need help using multiple content types in a wiki page library

    I currently trying to used multiple custom content types based off of the wiki page content type in one wiki page library. 
    EDIT: "Allow management of content types" has been enabled with the designer
    The way i would like this library to work is:
    Click the "Files" tab in the ribbon
    Click the "New Document" drop down menu
    Select one of the content types (Client, Contact, Project)
    SharePoint Will Ask for the Page Name and content type fields
    Click create
    Then it will take you to the new created page.
    This issue I'm currently having is when i click on one of the options (Client, Contact, Project) it will ask for a page name then you have to check it in to get to the edit form. The edit form it then loads is the default content type and not the selected
    content type.
    So my questions are.
    Is there any way i can combine the page name and edit steps together into one step?
    How can I get the edit form to pull from the selected content type?
    Thanks in advanced
    James T.F

    Wiki library isn't really designed for customizations... it's a "special" library that overrides a lot of default behavior... similar evidence can be found if you're trying to add metadata columns to wiki pages... they're just not really designed to handle
    it very well.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Tomcat always generates charset in Content-Type http header !!!

    Dear All! I need urgent help with a problem I met with and any suggestion are very appreciated!
    The problem is:
    We are using Tomcat as a web server (and JSP engine), and we would like to use a user control written in C# 2.0 on one of our pages. I've developed such component and tested it using JBuilderX (in fact it resides inside a JSP page). Everything is working fine while debugging using JBuilder, but when I tried to deploy the solution - I got a problem, my dll was not downloaded properly. Let me illustrate this with a test example. I wrote a test html page:
    <html > <head> <title>Test</title> </head> <body> <object id="MyControl" height="300" width="550" classid="http://localhost:8080/MyDLL.dll#WindowsControlLibrary1.UserControl1"> </object> </body> </html>
    When I tried to open it I did not get my control loaded. I check the headers of the server http response and found that Tomcat added the following string as
    Content-Type: application/x-msdownload;charset=ISO-8859-1
    I'm positive that in this case Content-Type should look like
    Content-Type: application/x-msdownload
    (or application/octet-stream if I would choose to define mime type for dll in server's web.xml as
    <mime-mapping> <extension>dll</extension> <mime-type>application/octet-stream</mime-type> </mime-mapping>
    - it does not matter as I understand )
    so Content-Type should not contain any charset for DLL part of response. NO charset=ISO-8859-1 !!
    But Tomcat adds it. :-( And I don't know how to prevent him doing that.
    On the other hand when I tried to open this page using Tomcat started from within JBuilder (port number in this case is different) - then everything was going good and control was downloaded to "Temporary Internet Files" and shown on the page.
    Content-Type field in this case was:
    Content-Type: application/x-msdownload
    without any charset.
    So, my question is: How to suppress Tomcat wish to add the "charset=ISO-8859-1" string to the Content-Type http response header?
    What should I do to load my test html page succesfully?
    Thanks in advance for you time and patience!
    Sincerely yours, Igor

    Back to the top

  • Can't create a Content Type List Item on Visual Studio 2010

    Can't create a Content
    Type List Item on Visual Studio 2010

    Hi,
    According to your description, my understanding is that you want to select the specific content type in new item form.
    This is a default behavior. The "Add new item" link uses the default content type and does not display a dropdown list to change that value. This behavior is hard coded into the control and can't be changed.
    Here are some similar threads for your reference:
    https://social.technet.microsoft.com/Forums/en-US/de60f2a1-df91-4a67-a606-02a593c977b4/choose-a-content-type-when-creating-a-new-list-item?forum=sharepointcustomizationlegacy
    http://sharepoint.stackexchange.com/questions/13281/content-type-field-missing-from-new-form
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • Upgrade SharePoint Content Types / Site Columns declaratively in SharePoint hosted apps

    Hi!
    I have a question where I was unable to find any official guidance for. I have created a SharePoint hosted APP where I have multiple site columns and content types (declared in XML). The APP installs and functions just fine. 
    Now I have a requirement to change a site column (Choice field, just add some more choice values). I was able to update the site column but the changes will not be reflected on the list column (I think because there no way to push the changes).
    So is there an "official" way of changing site columns?
    Any help is appreciated!
    Thx!

    msdn -
    How to: Update app web components in SharePoint 2013 :
    We do not support changing the data type of a list or content type field (column) after its initial deployment in any
    circumstance. In particular, do not change the data type of a field as part of an app update (not
    even programmatically). As an alternative, you can add a new field. If the app includes custom item create, edit,
    or view forms; be sure to make corresponding changes in these forms. For example, add UI for the new field and remove UI for the old one. (In a provider-hosted app, you can programmatically move data from the old field to the new one and then delete the old.
    How to: Update apps for SharePoint
    [custom.development]

  • Content Type choices

    Hi all,
    I have created some content types in Task list. To choose the content type, I need to click on the new item in ribbon and choose the one I need. It is inconvenient. The "new task" button just show the original one only. Could I click on it and
    then choose the content type like the "Edit item" support?
    Thanks,
    Andy Nguyen.

    Hi,
    Based on your description, my understanding is that when you click new task in tasks list, the content type choice field missing from new form.
    There is no OOTB method to make the content type choice field display in the new form.
    When we click the new task button we are by default selecting the default content type so the content type field is not available.  Users will need to click the dropdown in the ribbon and select the correct content type.
    Besides, here are similar posts, you can use as a reference:
    https://social.technet.microsoft.com/Forums/en-US/217eb758-9090-49c9-bb7f-b6f2ca334ce4/content-types-as-choice-field-on-newformaspx?forum=sharepointgeneralprevious
    https://social.technet.microsoft.com/Forums/en-US/c5e4bbe0-91c4-429c-9442-4bd229f5e773/content-type-choice-field-missing-from-new-form-and-missing-in-group-by-for-view?forum=sharepointgeneralprevious
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • Newform swich content types whilst entering data

    Hi
    I have a list with multiple content types.
    When a new item is ceated I want the ability to switch content types whilst entering the data.
    Is this possible with either InfoPath or SPD?
    Thanks

    Hi ,
    When we create a new item, the content type cannot be changed.
    The content type filed will show in EditForm when there two or more content types with the same based parent content type in the same list/library. For example, if you create a custom content type which content type is Item, then when you edit the item you
    create based on the custom Item content type, you will see the content type field.
    For your issue , as a workaround, you can create a new item based on a content type and save it. If you want to change the content type of the created item, you can edit it to change the content type filed.
    I hope this helps.
    Thanks,
    Wendy
    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]
    Wendy Li
    TechNet Community Support

  • Cannot add hub-managed content type with external list lookup columns to a list -- Error:Id field is not set on the external data field

    This is a variation on the issue mentioned in this
    post
    We are using SP 2010 Content Hub to manage our content types.  On the content hub we've created a couple of exteranl lists, and then created some site columns as lookups against these lists.  We then added the columns to one of our content types
    and set it to publish.
    After the publishing job executed, I tried adding the content type (which now appears on the subscriber sites) to one of the document libraries on one of the subscriber sites.  When I did that it threw the following error:
    Microsoft.SharePoint.WebControls.BusinessDataListConfigurationException: Id field is not set on the external data field    
    at Microsoft.SharePoint.SPBusinessDataField.CreateIdField(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()     
    at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)     
    at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)     
    at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)     
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    b55297ed-717f-466d-8bdc-297b20344d3f
    I checked the external  content type configuration and it did specify an "id column".  Anyone know if what I am attempting to do is possible and if so, what special configurations are required?
    Thanks

    The issue is not External Content type or external list but the look up column.
    It's not possible to publish a look up column via the Content Type Hub.
    If you need to do this then an alternate way is to use a Managed Metadata column instead, otherwise you will have to implement this via a feature.
    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

  • Cannot get rid of default field in a custom content type

    hi guys,
    I have custom content type based on Document Set in a List based on Document Library. I created both using XML declaration in SP solution.
    I have all fields in my content type which I declared, except to defult fields: 'Name' and 'Description'. I need to hide both of them. After I set Inherits="FALSE" in ContentType section in Elements.xml in ContentType description the field
    'Description' goes away. But the field 'Name' marked as required and stays.
    I've also tried to add RemoveFieldRef parameter to the same Elements file, but the field persists. I assume it comes from list definition, not content type. But I cannot figure out how to get this field out from list definition.
    Do I miss something?

    I am assuming that content type's elements.xml file is looking like this 
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <!-- Parent ContentType: Document Set (0x0120D520) -->
      <ContentType ID="0x0120D520008d2ff418027e4c31b54d155b98596748"
    Overwrite="True"
    Name="Custom Dossier"
    Group="Custom group"
    Description="Custom dossier"
    Inherits="True"
    Version="0">
        <FieldRefs>
                <FieldRef
    ID="{8D6C094C-3E1F-41f4-BEE3-25B27EE09702}"
    Name="Dossier_Nummer"
    DisplayName="Dossiernummer"
    Required="True" 
    />
        </FieldRefs>
        <XmlDocuments>
          <XmlDocument NamespaceURI="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes">
            <act:AllowedContentTypes
    xmlns:act="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes"
    LastModified="05/31/2012 08:46:56">
              <AllowedContentType
    id="0x0101"
    />
              <AllowedContentType
    id="0x0101000490d50c50624b6ca21c637ef39cd89b"
    />
            </act:AllowedContentTypes>
          </XmlDocument>
        </XmlDocuments>
      </ContentType>
    </Elements>
    In the FieldRef  section ,we have  <FieldRef
    ID="{8D6C094C-3E1F-41f4-BEE3-25B27EE09702}"
    Name="Dossier_Nummer"
    DisplayName="Dossiernummer"
    Required="True" 
    />  this field is there.
    Try to add ShowInNewForm="TRUE" ShowInEditForm="FALSE" those attributes.
    or    Hidden="FALSE" 
    Sorry for the bad English. Could you paste your code.So that we can assist u.

Maybe you are looking for

  • IDOC type to send OPEN ITEMS per INVOICE to external system?

    Dear EDI Experts, we want to send OPEN ITEMS of a customer per document via EDI to an XML file. We checked on idoc type CRESTA01 but this idoc type provides "only" the total OPEN ITEMS of a customer but NOT e.g the invoice document numbers. Is there

  • I have lost my iphoto library, it is now just a white package icon

    If someone could suggest the best course of action for me I would be very grateful . I have lost my photos like many here. I had backups etc, carbon clone and Time machine,For some reason my ilibrary seemed to be opening from my external drive and I

  • Simple question on view but solution seems to be bit confusin plz help

    i want to construct a view on top of a table with a condition: I should not modify the view each time a new column is added to table. eg: table has empno ename address grade 1 aaa US A 2 bbb US c 1 aaa US B 2 ddd AUS B I want to create a view on top

  • Ldap group lookups very slow

    We are currently testing Solaris 11 on one of our servers. We are encountering the problem that ldap group lookups are very slow. This didn't occur under Solaris 10. The ldap information is held in Active Directory with all unix information held in a

  • How can I get iPhoto onto my mac?

    I've had my mac desktop for about a year now. How do I get iPhoto?