Here is how to set column validation formula for SharePoint field to contain only numbers and only two symbols (fixed length). You have to use a “single line of text” field because the number field won’t work this way.

Here is the formula:

=IF(LEN(CustomSortOrder)=2,ISNUMBER(CustomSortOrder+0),FALSE)

This works for both SharePoint 2010 and 2013 and can be set in the user interface.

If you are creating a WSP:

Here is the xml for the field called “CustomSortOrder” is a required field with the deafult value set to “00”:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Field
        ID="{[id]}"
        Name="CustomSortOrder"
        DisplayName="Sort Order"
        Type="Text"
        Required="TRUE"
        EnforceUniqueValues="FALSE"
        Indexed="FALSE"
        MaxLength="2"
        Group="CustomField">
    <Default>00</Default>
    <Validation Message="The value of this field must be between 01 and 99 and with 2 characters.">
=IF(LEN(CustomSortOrder)=2,ISNUMBER(CustomSortOrder+0),FALSE)
</Validation> </Field> </Elements>

 

In my search for this solution I found some other formulars at The Chris Kent blog:

 

Happy SharePointing.

 

Tags: , | Categories: SharePoint Development | SharePoint Configuration

Todd Klindt has made a very useful SumUp on how to create different SharePoint Admin Permissions.

For more information, take a look at Todds post Demystifying SharePoint Admin Permissions at Todd Klindt's SharePoint Admin Blog

Web Application Policy

How Do You Give It?

In Central Admin > Manage Web Applications > Policy for Users

Farm Administrators in Central Admin

How do you give it?

In Central Admin > Security > Farm Administrators

SPShellAdmin

How do you give it?

From PowerShell with the Add-SPShellAdmin cmdlet.

Service App Administrator

How do you give it?

Central Admin > Service Application Management. Highlight the service application and click “Administrators" in the ribbon. Add the user to the Administrators list.

Tags: , , | Categories: Tips and tricks | SharePoint Configuration

Trying to filter a list on its workflow status is pretty non-intuitive. You need the special status codes. Theese will work with all workflows in ShaePoint even Nintex workflows.

Status Code

Status Description

0

Not Started

1

Failed on Start

2

In Progress

3

Error Occurred

4

Cancelled (i.e. Stopped by User)

5

Completed

6

Failed on Start (retrying)

7

Error Occurred (retrying)

8

(unknown)

9

(unknown)

10

(unknown)

11

(unknown)

12

(unknown)

13

(unknown)

14

(unknown)

15

Cancelled

16

Approved

17

Rejected

Theese status codes can be used in editing list view query in both the user interface and the CAML in the list schema.xml

image005

 

image006

Another little special SharePoint speciality is that the workflow status field is referenced as the 8 first letters in the workflow instance name and the value type as WorkflowStatus

References:

Tags: , , , , , | Categories: Tips and tricks | SharePoint Development | SharePoint Configuration

Here is a list of web template features to use in your SharePoint 2013 web template projects.

Make sure that each of the features in the table beneath is contained in the WebFeatures section in your ONET.XML

DisplayName

Feature ID

AccSvcAddAccessApp

d2b9ec23-526b-42c5-87b6-852bd83e0364

AnnouncementsList

00bfea71-d1ce-42de-9c63-a44004ce0104

BaseWeb

99fe402e-89a0-45aa-9163-85342e865dc8

BizAppsListTemplates

065c78be-5231-477e-a972-14177cc5b3c7

ContactsList

00bfea71-7e6d-4186-9ba8-c047ac750105

ContactsList

00bfea71-7e6d-4186-9ba8-c047ac750105

CustomList

00bfea71-de22-43b2-a848-c05709900100

DataConnectionLibrary

00bfea71-dbd7-4f72-b8cb-da7ac0440130

DataSourceLibrary

00bfea71-f381-423d-b9d1-da7a54c50110

DiscussionsList

00bfea71-6a49-43fa-b535-d15c05500108

DocumentLibrary

00bfea71-e717-4e80-aa17-d0c71b360101

EventsList

00bfea71-ec85-4903-972d-ebe475780106

EventsList

00bfea71-ec85-4903-972d-ebe475780106

ExternalList

00bfea71-9549-43f8-b978-e47e54a10600

FollowingContent

a7a2793e-67cd-4dc1-9fd0-43f61581207a

GanttTasksList

00bfea71-513d-4ca0-96c2-6a47775c0119

GettingStarted

4aec7207-0d02-4f4f-aa07-b370199cd0c7

GridList

00bfea71-3a1d-41d3-a0ee-651d11570120

HierarchyTasksList

f9ce21f8-f437-4f7e-8bc6-946378c850f0

IPFSWebFeatures

f9ce21f8-f437-4f7e-8bc6-946378c850f0

IssuesList

00bfea71-5932-4f9c-ad71-1557e5751100

LinksList

00bfea71-5932-4f9c-ad71-1557e5751100

MBrowserRedirect

d95c97f3-e528-4da2-ae9f-32b3535fbb59

MDSFeature

87294c72-f260-42f3-a41b-981a2ffce37a

MobilityRedirect

f41cc668-37e5-4743-b4a8-74d1db3fd8a4

MySiteMicroBlog

ea23650b-0340-4708-b465-441a41c37af7

NoCodeWorkflowLibrary

00bfea71-f600-43f6-a895-40c0de7b0117

PictureLibrary

00bfea71-52d4-45b3-b544-b1c71b620109

PremiumWeb

0806d127-06e6-447a-980e-2e90b03101b8

PromotedLinksList

192efa95-e50c-475e-87ab-361cede5dd7f

ReportListTemplate

2510d73f-7109-4ccc-8a1c-314894deeb3a

SiteFeed

15a572c6-e545-4d32-897a-bab6f5846e18

SiteFeedController

5153156a-63af-4fac-b557-91bd8c315432

SurveysList

00bfea71-eb8a-40b1-80c7-506be7590102

TaskListNewsFeed

ff13819a-a9ac-46fb-8163-9d53357ef98d

TasksList

00bfea71-a83e-497e-9ba0-7a5c597d0107

TeamCollab

00bfea71-4ea5-48d4-a4ad-7ea5c011abe5

WebPageLibrary

00bfea71-c796-4402-9f2f-0eb9a6e71b18

WikiPageHomePage

00bfea71-d8fe-4fec-8dad-01c19a6e4053

WorkflowHistoryList

00bfea71-4ea5-48d4-a4ad-305cf7030140

workflowProcessList

00bfea71-2d77-4a75-9fca-76516689e21a

WorkflowServiceStore

2c63df2b-ceab-42c6-aeff-b3968162d4b1

WorkflowTask

57311b7a-9afd-4ff0-866e-9393ad6647b1

XmlFormLibrary

00bfea71-1e1d-4562-b56a-f05371bb0115

Tags: , | Categories: SharePoint Development

The following table lists the locales/languages with an assigned Locale ID (LCID).

Helpful in development of solutions in multilingual environments.

Language

Country/Region

Locale ID

Afrikaans

South Africa

1078

Albanian

Albania

1052

Arabic

Algeria

5121

Arabic

Bahrain

15361

Arabic

Egypt

3073

Arabic

Iraq

2049

Arabic

Jordan

11265

Arabic

Kuwait

13313

Arabic

Lebanon

12289

Arabic

Libya

4097

Arabic

Morocco

6145

Arabic

Oman

8193

Arabic

Qatar

16385

Arabic

Saudi Arabia

1025

Arabic

Syria

10241

Arabic

Tunisia

7169

Arabic

U.A.E.

14337

Arabic

Yemen

9217

Armenian

Armenia

1067

Azeri (Cyrillic)

Azerbaijan

2092

Azeri (Latin)

Azerbaijan

1068

Basque

Spain

1069

Belarusian

Belarus

1059

Bulgarian

Bulgaria

1026

Catalan

Spain

1027

Chinese

Hong Kong S.A.R.

3076

Chinese

Macau S.A.R.

5124

Chinese

(Default Chinese-Simplified Locale ID)

People's Republic of China

2052

Chinese

Singapore

4100

Chinese

Taiwan

1028

Croatian

Croatia

1050

Czech

Czech Republic

1029

Danish

Denmark

1030

Divehi

Maldives

1125

Dutch

Belgium

2067

Dutch

Netherlands

1043

English

Australia

3081

English

Belize

10249

English

Canada

4105

English

Caribbean

9225

English

Ireland

6153

English

Jamaica

8201

English

New Zealand

5129

English

Republic of the Philippines

13321

English

South Africa

7177

English

Trinidad and Tobago

11273

English

United Kingdom

2057

English

(Default English Locale ID)

United States

1033

English

Zimbabwe

12297

Estonian

Estonia

1061

Faroese

Faeroe Islands

1080

Farsi

Iran

1065

Finnish

Finland

1035

French

Belgium

2060

French

Canada

3084

French

(Default French Locale ID)

France

1036

French

Luxembourg

5132

French

Principality of Monaco

6156

French

Switzerland

4108

FYRO Macedonian

Former Yugoslav Republic of Macedonia

1071

Galician

Spain

1110

Georgian

Georgia

1079

German

Austria

3079

German

(Default German Locale ID)

Germany

1031

German

Liechtenstein

5127

German

Luxembourg

4103

German

Switzerland

2055

Greek

Greece

1032

Gujarati

India

1095

Hebrew

Israel

1037

Hindi

India

1081

Hungarian

Hungary

1038

Icelandic

Iceland

1039

Indonesian

Indonesia

1057

Italian

(Default Italian Locale ID)

Italy

1040

Italian

Switzerland

2064

Japanese

Japan

1041

Kannada

India

1099

Kazakh

Kazakhstan

1087

Konkani

India

1111

Korean

Korea

1042

Kyrgyz

Kyrgyzstan

1088

Latvian

Latvia

1062

Lithuanian

Lithuania

1063

Malay

Brunei Darussalam

2110

Malay

Malaysia

1086

Marathi

India

1102

Mongolian

Mongolia

1104

Norwegian (Bokmål)

Norway

1044

Norwegian (Nynorsk)

Norway

2068

Polish

Poland

1045

Portuguese

Brazil

1046

Portuguese

Portugal

2070

Punjabi

India

1094

Romanian

Romania

1048

Russian

Russia

1049

Sanskrit

India

1103

Serbian (Cyrillic)

Serbia and Montenegro

3098

Serbian (Latin)

Serbia and Montenegro

2074

Slovak

Slovakia

1051

Slovenian

Slovenia

1060

Spanish

Argentina

11274

Spanish

Bolivia

16394

Spanish

Chile

13322

Spanish

Colombia

9226

Spanish

Costa Rica

5130

Spanish

Dominican Republic

7178

Spanish

Ecuador

12298

Spanish

El Salvador

17418

Spanish

Guatemala

4106

Spanish

Honduras

18442

Spanish

Mexico

2058

Spanish

Nicaragua

19466

Spanish

Panama

6154

Spanish

Paraguay

15370

Spanish

Peru

10250

Spanish

Puerto Rico

20490

Spanish

Spain

1034

Spanish

Uruguay

14346

Spanish

Venezuela

8202

Spanish - Modern Sort

(Default Spanish Locale ID)

Spain

3082

Swahili

Kenya

1089

Swedish

Finland

2077

Swedish

Sweden

1053

Syriac

Syria

1114

Tamil

India

1097

Tatar

Tatarstan

1092

Telugu

India

1098

Thai

Thailand

1054

Turkish

Turkey

1055

Ukrainian

Ukraine

1058

Urdu

Islamic Republic of Pakistan

1056

Uzbek (Cyrillic)

Uzbekistan

2115

Uzbek (Latin)

Uzbekistan

1091

Vietnamese

Viet Nam

1066

Welsh

United Kingdom

1106

 

Reference:

http://msdn.microsoft.com/en-us/library/ms912047%28v=winembedded.10%29.aspx

Tags: | Categories: Web development | SharePoint Development

At last it is now possible to download a standalone SkyDrive Pro client.

The standalone SkyDrive Pro sync client allows users of SharePoint 2013 and SharePoint Online in Office 365 to sync their personal SkyDrive Pro and any SharePoint 2013 or Office 365 team site document libraries to their local machine for access to important content on and offline. The SkyDrive Pro sync client can be installed side-by-side with previous versions of Office (Office 2010, Office 2007, etc).

 Download SkyDrive Pro client for Windows

Tags: , , , , , | Categories: SharePoint related

Spence Harbars latest blog post (Antivirus and SharePoint 2013) is going through the different antivirus solutions for SharePoint 2013. The list of 3rd party vendors for this SharePoint is surprisingly small; only 1 vendor has a working solution and it is only in beta! Well at Todd Klindt's SharePoint Admin Blog, Todd talks shortly about this and his experience with antivirus and the need for an antivirus solution for a product as SharePoint in his weekly netcast found at Netcast 147 - Where Viruses Are

Tags: | Categories: SharePoint related
Invalid text value. A text field contains invalid data. 
Please check the value and try again.

Got this message in the ULS after starting a workflow. After some testing, re-deploys and cursing I found the answer: I was adding to much text to a single line text field!
It happens when the value you are adding for a text field is larger than 255 characters, so use lesser characters or change the type to a note field.

Well not much of a helpful error message but again, its SharePoint. Smile

Links
ULS

w3wp.exe (0x1898)

0x1980

SharePoint Foundation

Workflow Infrastructure

72er

Medium

Message:

Microsoft.SharePoint.SPException: Invalid text value. A text field contains invalid data. Please check the value and try again. ---> System.Runtime.InteropServices.COMException (0x81020018): Invalid text value. A text field contains invalid data. Please check the value and try again. at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) --- End of inner exception stack trace --- at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename, Boolean bPreserveItemUIVersion) at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename, Boolean bPreserveItemUIVersion) at Microsoft.SharePoint.SPListItem.Update() at Microsoft.SharePoint.Workflow.SPWinOETaskService.CommitTask(Transaction txn, Object[] transData)

Tags: , , | Categories: SharePoint Development

Automatic Windows Update caused my SP2012 Dev enviroment to break today!

The Security Update KB2756920 caused every SharePoint site to error out with “Object reference not set to an instance of an object.”  on Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties()

image

other symptom's where with the Security Token Service:

An exception occurred when trying to issue security token: The requested service, 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas' could not be activated. See the server's diagnostic trace logs for more information..

Trying to acces the service would give:

Method Not found: "System.String System.ServiceModel.Activation.Iis7Helper.ExtendedProtectionDotlessSpnNotEnabledThrowHelper(System.Object)"

image

Apparently it only happens to windows 2008 r2, with no SP1 installed.

Reference see TechNet: http://social.technet.microsoft.com/Forums/en-GB/sharepointadminprevious/thread/903d0e22-6419-48c5-8669-a1191c841b76

Tags: , , | Categories: SharePoint Configuration