SharePoint Tip of the Day – Provide default value for your list instance with special characters.

Whenever you need to provide default values for your list that contains special characters like "<" "&" and so on, don't forget to encapsulate them in CDATA, neither the html entity name nor the entity number is working…

    Description="Power items list that will store and manage the various power values."

          <Field Name='ID'>1</Field>
          <Field Name='Title'><![CDATA[<10W]]></Field>
          <Field Name='ID'>2</Field>
            <Field Name='Title'>10 – 50W</Field>
          <Field Name='ID'>3</Field>
            <Field Name='Title'>50 – 100W</Field>
            <Field Name='ID'>4</Field>
            <Field Name='Title'>100 – 150W</Field>
            <Field Name='ID'>5</Field>
            <Field Name='Title'>150 – 250W</Field>
            <Field Name='ID'>6</Field>
            <Field Name='Title'>250 – 600W</Field>
            <Field Name='ID'>7</Field>
            <Field Name='Title'><![CDATA[> 600W]]></Field>



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s