ContentTypes

Gregory K. Maxey 1 Reputation point
2021-02-10T18:14:45.793+00:00

I have no experience with SharePoint and don't even have the application installed. However, I have managed to create and XML file and and XSD file that when loaded via Microsoft Word Developer>XML Mapping Pane>Add new part ... interface results in customize the
Insert>Text>QuickPart>Document Property menu. The following snippet results in a menu item "Project Status" that when clicked inserts a DropDownList content control in Word.

dms is associated with http://schemas.microsoft.com/office/2006/documentManagement/types. Through some trial and error, I have learned that some other valid base values include "Text, Note, Bollean, Number, Currency, Lookup" What I am trying to figure out is if there is a valid base term that results in a ComboBox content control so the user can either choose a defined enumeration or fillin content. Thanks.

<xsd:element name="ProjectStatus" nillable="true" ma:displayName="Project Status" ma:default="InProgress" ma:hidden="false" ma:internalName="ProjectStatus" ma:readOnly="false">
<xsd:simpleType>
<xsd:restriction base="dms:Choice">
<xsd:enumeration value="Not Started"/>
<xsd:enumeration value="In progress < 25%"/>
<xsd:enumeration value="In progress < 50%"/>
<xsd:enumeration value="In progress < 75%"/>
<xsd:enumeration value="In progress > stages"/>
<xsd:enumeration value="On Hold"/>
<xsd:enumeration value="Canceled"/>
<xsd:enumeration value="Completed"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,030 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
599 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,619 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,957 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,036 Reputation points
    2021-02-11T03:58:57.777+00:00

    Hi @Gregory K. Maxey ,

    In SharePoint, there is Allow 'Fill-in' choices option to enable users to fill in content.

    66737-image.png

    Then I insert the field in word, the snippet for the field is the below:

    <xsd:element name="Choice1" ma:index="13" nillable="true" ma:displayName="Choice1" ma:default="A" ma:format="Dropdown" ma:internalName="Choice1">  
    <xsd:simpleType>  
    <xsd:union memberTypes="dms:Text">  
    <xsd:simpleType>  
    <xsd:restriction base="dms:Choice">  
    <xsd:enumeration value="A"/>  
    <xsd:enumeration value="B"/>  
    <xsd:enumeration value="C"/>  
    </xsd:restriction>  
    </xsd:simpleType>  
    </xsd:union>  
    </xsd:simpleType>  
    </xsd:element>  
    

    So for your requirement, you could add the belowing to make user can either choose a defined enumeration or fillin content.

    <xsd:simpleType>  
    <xsd:union memberTypes="dms:Text">  
    
    </xsd:union>  
    </xsd:simpleType>  
    

    For your snippet, update to this. It should work for you.

    <xsd:element name="ProjectStatus" nillable="true" ma:displayName="Project Status" ma:default="InProgress" ma:hidden="false" ma:internalName="ProjectStatus" ma:readOnly="false">
    <xsd:simpleType>
    <xsd:union memberTypes="dms:Text">

    <xsd:simpleType>
    <xsd:restriction base="dms:Choice">
    <xsd:enumeration value="Not Started"/>
    <xsd:enumeration value="In progress < 25%"/>
    <xsd:enumeration value="In progress < 50%"/>
    <xsd:enumeration value="In progress < 75%"/>
    <xsd:enumeration value="In progress > stages"/>
    <xsd:enumeration value="On Hold"/>
    <xsd:enumeration value="Canceled"/>
    <xsd:enumeration value="Completed"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:union>
    </xsd:simpleType>

    </xsd:element>


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.