Sharepoint auto number calculation

Here is another Sharepoint calculation I found useful (auto numbering + concatenate).  Good for non frequent auto numbering

=CONCATENATE(“http://be-app1:36124/”,RIGHT(CONCATENATE(ROUND(Created,7)),7))

Here is what it does:

–          It rounds your create time to the closes 7 digital (which will result in something like 111111.1234567)

–          String the number

–          Then right only the last 7 character.

–          Since this is in millisecond, you will always get a integer formatted auto number (ok, close enough that the odd of getting the same number is very low unless you are doing some kind of document processing daily and keep generating these number at very high speed)

OR another option could be to take the entire number and x it by 1000000 to turn it into integer, then use that as auto number, this way you also get to keep the years and dates as part of the auto number

Auto number in Sharepoint

Here is a sample on how to create a auto number field in Sharepoint:

=RIGHT(CONCATENATE(ROUND(Created,7)),7)

Infopath auto number, substring usage

Was working on infopath the other day, here are some sample function I used (just in case you are too lazy to write them):

–          Infopath does not support auto numbering, so I used concat and substring to resolve this problem:

  • Example:  today() = 2007-02-08 and now() = 2007-02-08T14:20:39
  • To string using date:  concat(substring(today(), 1, 4), substring(today(), 6, 2), substring(today(), 9, 2)) = 20070208
  • To string using time: concat(substring(now(),12,2),substring(now(),15,2),substring(now(),18,2)) = 142039

–          Here is a string which you will ALWAYS GET A UNIQUE auto number:

  • concat(substring(today(), 1, 4), substring(today(), 6, 2), substring(today(), 9, 2),substring(now(),12,2),substring(now(),15,2),substring(now(),18,2))

Start your Sharepoint timer job right away

in the event your timer job does not start (such as retracting your solution), use the following command: 

stsadm -o execadmsvcjobs 

A very useful common when developing

Sharepoint give you an 401 error when enabling email address in distribution group (when changing the settings or creating a new group)

Sharepoint give you an 401 error when enabling email address in distribution group (when changing the settings or creating a new group)

–          Check if your web app pool account have correct permission

–          You were able to create the group and saves it.  But every time the button is set to “yes” to enable distribution list to accept incoming email

–          I had my app pool as Network Services, once I manually define an error, the problem disappear.

SharePoint Governance

Here is a great article about SharePoint Governance

http://www.intranetjournal.com/articles/200611/ij_11_27_06a.html
http://www.intranetjournal.com/articles/200611/ij_11_29_06a.html