Partager via


Values possible for PropertyName in SPMobileFieldPropertyLabel for SharePoint mobile development

I was recently asked what the valid values are for this property. This is what I heard back from the development team. Hopefully it is useful to some other SharePoint developers also.

SPMobileFieldPropertyLabel Members (PropertyName and FormatString)

PropertyName

The possible values for this property are the followings:

  • "Type"

  • "InternalName"

  • "Title"

  • "Description"

  • "DefaultFormula"

  • "DefaultValue"

  • Other field attributes defined in schema.xml as follows:

     

<Fields>
    <Field ID="FID_Body" Type="Note" RichText="TRUE" RichTextMode="FullHtml" IsolateStyles="TRUE" NumLines="15" Name="Body" DisplayName="Body" Sortable="FALSE" />
</Fields>

If the schema.xml for the current list contains above field definition, the below property names can be used.

  • "ID"                    // "FID_Body: " is rendered.
  • "Type"                  // "Note: "     is rendered.
  • "RichText"              // "TRUE: "     is rendered.
  • "RichTextMode"          // "FullHtml: " is rendered.
  • "IsolateStyles"         // "TRUE: "     is rendered.
  • "NumLines"              // "15: "       is rendered.
  • "Name"                  // "Body: "     is rendered.
  • "DisplayName"           // "Body: "     is rendered.
  • "Sortable"              // "FALSE: "    is rendered.

 

Please refer to Field Element (List – Definition) for more detail.

FormatString

The default value specified in MobileDefault.ascx is "{0}: ".

This string is passed to System.String.Format() method along with the property value in order to generate the string to render.

e.g.

System.String.Format("{0}: ", "Body");  // "Body: " is rendered.