Mobile ‘Limits’ for SharePoint


So I was playing with mobile views the other day and noticed that there seemed to be limits (Ellipses) on mobile views. When I say limit I just mean something that requires custom code and is not available out of the box. I could not seem to find an article that summarized the mobile ‘limitations’ so here they are.

Afterthought: Oh and an Ellipses is where it goes ‘…’ and cuts off text.

Mobile ‘Limitations’:

A very quick google search brought up the following table of what is limited for views of lists and libraries on mobile devices (from http://office.microsoft.com/en-us/sharepointserver/HA100215771033.aspx).

What’s interesting (and terrific) here is the fact that this table is just the default values for these view limits, you can change them (more on that a bit later). This is what will render before it ‘cuts off’ with the ellipses.

Item

Limit

Characters in the Web title of a list or library

20

Characters in a list or library name

20

Number of mobile views

10

Number of items displayed in a view

100

Characters in a list item title

20

Characters in a column name

20

Single-line text field type

256

Multiple-line text field type

256

Each choice in a choice field type

10

Number of options in a choice field type

10

Characters in each item in a lookup field

20

Number of options in a lookup list

20

Characters in a hyperlink or picture field

20

Characters in an attachment file name

20

Number of attachments (to list items) displayed

3

Characters in a calculated field

20

I also found out that certain lists do not render in SharePoint mobile views (example Discussion Boards). I do know that these four lists DO render in mobile views though.

  1. Announcements
  2. Calendar
  3. Tasks
  4. Shared Documents

So always curious I decided to look into why and how these values seem to function and what can be done, and lots can be done! The above limitations for the ellipses can be configured, and if you can develop on top of the work the SharePoint team has already done!

Fields (and Field Behavior in Mobile)

Fields themselves will display differently (or not at all) in Mobile views.

The following field types are not displayed in mobile list views:

  • Attachments field
  • CrossProjectLink field
  • Recurrence field

Only the following types of Computed fields are displayed in mobile list view pages:

  • LinkTitleNoMenu
  • LinkCheckedOutTitle
  • LinkFilenameNoMenu
  • LinkTitle
  • LinkFilename
  • LinkDiscussionTitle
  • BodyAndMore
  • PersonViewMinimal
  • NameOrTitle
  • URLwMenu.

For the following keep in mind that any control that exceeds a rendering limit becomes read-only even if it is nominally read/write.

Read-Only Controls in Mobile Forms

Windows SharePoint Services Field Type

ASP.NET Mobile Control

Comment

Single line of text

Label

Same as ASP.NET control except for rendering of ellipses.

Multiple lines of text

TextView

Renders plain text of rich HTML text field type.

Choice

Label

Same as ASP.NET control except for rendering of ellipses.

Number

Label

Leverages Windows SharePoint Services field type controls for format conversion.

Currency

Label

Leverages Windows SharePoint Services field type controls for format conversion.

Date and time

Label

Leverages code in Windows SharePoint Services field type controls for local date/time conversion.

Lookup

Label

Does not support presence or linking to user information.

Yes/no

Label

Same as ASP.NET control except for rendering of ellipses.

Hyperlink or picture

Link

Same as ASP.NET control except for rendering of ellipses.

Calculated

Label

Same as ASP.NET control except for rendering of ellipses.

Attachment

Link

The number of attachments to display is limited. Up to three attachments are displayed, which is set by a rendering limit.

Recurrence field

Label

Same as ASP.NET control except for rendering of ellipses.

Read/Write Controls in New or Edit Forms

Windows SharePoint Services Field Type

ASP.NET Mobile Control

Comment

Single line of text

TextBox

Displays read-only Label control the same as in a Display form if the data to edit exceeds a maximum character limit.

Multiple lines of text

TextBox

Displays read-only Label control the same as in a Display form if the data to edit exceeds a maximum character limit. If the markup language of the current browser is not Wireless Markup Language (WML), theTextBox control is used. The TextBox control does not support rich HTML text formatting, and so in the Edit form, if the field type is rich HTML text, the field is rendered as a read-only control. In the New form, however, the TextBox control is used even when the field is in rich HTML text format.

Choice

SelectionList

Supports drop-down list boxes only, and allows multiple selections. In the New form, if the number of choice options exceeds a maximum number, the first n options (n = maximum number) are displayed and a warning message is displayed below the options. In the Edit form, a read-only Label control is displayed.

Number

TextBox

Does not provide minimum-maximum value range validation.

Currency

TextBox

Does not provide minimum-maximum value range validation.

Date and time

TextBox

Displays description text. Does not support the calendar date picker. The current locale in Windows SharePoint Services determines the date and time input format, but the current calendar type is ignored.

Lookup

SelectionList

The cutoff maximum limit behavior is the same as for the Choice field type.

Yes/no

SelectionList

Same as ASP.NET control except for rendering of ellipses.

Hyperlink or picture

TextBox

Does not display description text or allow the typing of descriptive text in the Display, Edit, or New form.

If the display name of the hyperlink or picture exceeds a maximum character limit, the remaining characters are truncated and an ellipsis () is appended. The URL itself is not truncated.

Name

TextBox

Read-only in Edit form. Does not support the New form for document libraries.

(Above from: http://msdn.microsoft.com/en-us/library/ms479269.aspx)

How to Configure a View Limitation (for Ellipses):

Rendering limits are determined in one of two ways:

  1. Through default configuration settings that are set in the mobile web.config file.
  2. Through the Properties property of the SPWeb class that can be configured per Web site through the object model.

Modifications you make to web.config are global to a front-end Web server, while changes you make through Web properties are scoped per Web site, which are not inherited by subsites.

So… to change it for an entire web application just modify the web.config for the web application you want these limits to be adjusted on.

Each limit setting is represented as a key-and-value pair within the <appSettings> section of the web.config file—for example, <add key="mobile_webtitlelimit" value="20" />. If the configuration for a text length limitation is set to 0 or no entry is specified, ellipsis rendering does not work.

OR

Property bag settings for a particular site override the global settings in web.config. So if you modify the property bag for a specitic web you can have it changed for that web. Just use (C#) code like this:

SPWeb webSite = SPContext.Current.Site.AllWebs["WebSite"];
SPPropertyBag propBag = webSite.Properties;
propBag["mobile_listtitlelimit"] = "15";
propBag.Update();

Using the above code you should also keep in mind that you requires a using Microsoft.SharePoint, and Microsoft.SharePoint.Utilities namespaces, and you must insert a FormDigest control in the default.aspx page of the custom web application.

The following table describes the rendering limit parameters used in mobile pages and shows their default maximum values. The unit of measure is character, regardless of half-width or full-width character.

Name

Description

Value

Base Rendering Limit

mobile_basetextlengthlimit

Base limit for text length

255

System Rendering Limits

mobile_enablelimitationondispform

Flag for ellipsis rendering on Display form

FALSE

mobile_fieldnumberlimitforinputform

Limit for the number of fields to show on New and Edit forms

100

mobile_fieldtitlelimit

Limit for the title of each field on forms

20

mobile_itemtitlelimit

Limit for the item title shown on forms

20

mobile_listtitlelimit

Limit for the List title on list views

20

mobile_viewitemnumberlimit

Limit for the number of items to show on list views

100

mobile_viewnumberlimit

Limit for the number of Views to show in the View drop down list

10

mobile_viewtitlelimit

Limit for the length of View names in the for View drop down selector

20

mobile_webtitlelimit

Limit for the length of the Web site title shown on the top page of the Web site

20

Field Related Limits

mobile_attachmentsfieldnumberlimit

Limit for the number of attachments to show

3

mobile_attachmentsfieldtextlimit

Limit for the file name of an individual attachment

20

mobile_calculatedfieldtextlimit

Limit for field value length for Calculated field

20

mobile_choicefieldoptionnumberlimit

Limit for the number of options to show on the New and Edit forms for a Choice field

10

mobile_choicefieldoptiontextlimit

Limit for the name of any individual on the New and Edit forms for a Choice field

20

mobile_fieldtextlimitforview

Limit for the length of any individual field value on list views

19

mobile_filefieldtextlimit

Limit for the field value length for File fields

20

mobile_lookupfieldoptionnumberlimit

Limit for the number of options to show on the New and Edit forms for a Lookup field

10

mobile_lookupfieldoptiontextlimit

Limit for the name of any individual option on the New and Edit forms for a Lookup field

20

mobile_multichoice_

displaylimitforselectedchoices

(The above is one word, I cut apart so it would display in my blog properly)

Limit for the number of selected choices, in a multi choice field, to show in list views and item Display forms

10

mobile_multilinetextfieldtextlimit

Limit for the field value length for text fields with multiple lines

256

mobile_multilookup_

displaylimitforselectedlookups


(The above is one word, I cut apart so it would display in my blog properly)

Limit for the number of selected lookup values, in a multi value lookup field, to show in list views and item Display forms

10

mobile_multiuser_

displaylimitforselectedusers

(The above is one word, I cut apart so it would display in my blog properly)

Limit for the number of selected users, in a multi user field, to show in list views and item Display forms

100

mobile_singlelinetextfieldtextlimit

Limit for the field value length for single line text fields

256

mobile_urlfieldtextlimit

Limit for the length of the text for a URL field (the URL itself is not shown and not truncated)

20

mobile_userfieldoptionnumberlimit

Limit for the number of options to show on New / Edit form for a user field

100

mobile_userfieldoptiontextlimit

Limit for the length of any individual option for a user field

20

(Above taken from: http://msdn.microsoft.com/en-us/library/ms468470.aspx)

Looking for more information on Mobile Settings, and Development in SharePoint? Look here: http://msdn.microsoft.com/en-us/library/ms464268.aspx (Most of the information above was taken from this area.)

Anyways I hope this helps someone when they work with Mobile Views in SharePoint,
Richard Harbridge

Advertisements
Explore posts in the same categories: Code, Feature, Reference, SharePoint 2007, Uncategorized

Tags: , ,

You can comment below, or link to this permanent URL from your own site.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s


%d bloggers like this: