Search This Blog

Thursday, November 11, 2010

SharePoint calculated field formulas

http://office.microsoft.com/en-us/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx
http://msdn.microsoft.com/en-us/library/bb862071.aspx

Friday, July 9, 2010

Enable Instant Search in Office Outlook 2010

Instant search in Office Outlook 2010 (OS Windows XP) is not supported directly.
To enable it download & install Windows Search 4.0 for Windows XP, available at http://www.microsoft.com/downloads/details.aspx?FamilyId=55C18CB3-C916-4298-ABA3-5B98904F7CDA&displaylang=en

How to hide SharePoint list from browsers

To hide SharePoint list from browsers do following:


  • Open SharePoint site with SharePoint Designer

  • Click on Lists folder & find desired list

  • Right Click--> Properties window, go to Settings tab

  • Check Hide from browsers checkbox

  • Done !

XSLT Date format dd-MMM-yyyy using ddwrt:FormatDateTime

<xsl:value-of select="ddwrt:FormatDateTime(string(@Created) ,1033 ,'dd-MMM-yyyy')" />
will produce 25-Apr-2009
<xsl:value-of select="ddwrt:FormatDateTime(string(@Created) ,1033 ,'dd-MMMM-yyyy')" />
will produce 25-April-2009
<xsl:value-of select="ddwrt:FormatDateTime(string(@Created) ,1033 ,'dd/MMM/yyyy')" />
will produce the result
25/Apr/2009

Change Title of SharePoint page, List page

Open desired sharepoint with SharePoint Desginer & use following javascript block:
<script type="text/javascript">
document.title="New Title";
</script>

Friday, June 18, 2010

Display Attachments in SharePoint designer XSL DataView

While creating DataView for any List in Sharepoint designer when we add attachment field it shows the values True or False.
To fix this issue & display actual attachment, go to code view of dataview & add following XSL code for attachment field:

Single Item View:
<SharePoint:AttachmentsField ControlMode="Display" ItemId="{@ID}" EnableViewState="true" FieldName="Attachments" runat="server"/>

Multiple Item View:
<SharePoint:AttachmentButton ControlMode="Edit" Enabled="true" ItemId="{@ID}" runat="server" Visible="false"/><SharePoint:AttachmentsField ControlMode="Display" ItemId="{@ID}" EnableViewState="true" FieldName="Attachments" runat="server"/>

Note: use appropriatefor single item view or multiple item view

Saturday, June 5, 2010

Add BCC option in SharePoint Workflow Email

BCC option is not available in Send an Email activity of SharePoint Designer workflow. But this can be achieved with little bit tweaking of .xoml file of respective workflow.

Do following steps:
  • Create new workflow using SharePoint designer & add Send an Email activity
  • Specify values in To & Cc fields of Email compose box & save the worlkflow
  • Open .xoml file of workflow & find BCC & CC values(BCC value should be null)
  • Swap the values to CC & BCC & save the .xoml file
  • Again open the Workflow with wizard, you will see CC value of Email activity is empty(null).
  • Compile the rest of email body & finish the workflow compilation wizard.
Now email will be sent as BCC.

Option that are not supported SharePoint Designer Workflow Email

The following options are not supported by the current version of the Send an Email action:

  • Specifying an address on the From line. (E-mail messages sent by the workflow always show the e-mail address specified by the server administrator on the From line. Only the server administrator can change this, and it can only be changed for all notifications in the current Web application, not per workflow.)
  • Including a hyperlink to the Workflow Status page. (There is no way to use a workflow lookup to supply the value of the WorkflowInstanceID variable in the query string.)
  • Using an embedded cascading style sheet (CSS) to format message content. (Text can be formatted by using the style attribute, but the <style> tag and CSS classes are not supported.)
  • Using a workflow lookup in either the To or CC box that references a column of the Person or Group type that contains multiple values.
  • Specifying a Bcc (blind carbon copy) recipient for a message. (A developer can modify the .ACTIONS file on the server to include a Bcc field, but this cannot be done in the Workflow Designer.)
  • Including another file with a message as an attachment.
  • Embedding image or graphic files in a message.
For more information visit : http://office.microsoft.com/en-us/sharepointdesigner/HA102390421033.aspx

Thursday, June 3, 2010

Grouping on People/Group field in SharePNoint XSLT DataView

While grouping SharePoint DataView on People/Group type column(field) , it doesn't produces the expected result. The result comes out as one group for each row in the SharePoint list.
To fix this issue replace following XSL code in dateview:
<xsl:variable name="NewGroup_adhoc">

<xsl:choose>

<xsl:when test="$dvt_groupfield">

<xsl:value-of select="ddwrt:NameChanged(string(*[name()=$dvt_groupfield] | @*[name()=$dvt_groupfield] | current()[name(.) = $dvt_groupfield]), 0)" /></xsl:otherwise>

<xsl:otherwise></xsl:otherwise>

</xsl:choose>

</xsl:variable>


with following

<xsl:variable name="NewGroup_adhoc">

<xsl:choose>

<xsl:when test="$dvt_groupfield">

<xsl:choose>

<xsl:when test="contains($dvt_groupfield, 'Owner')"> <xsl:value-of select="ddwrt:NameChanged(string(substring-before(@Owner,'</A>')), 0)"/></xsl:when>

<xsl:otherwise><xsl:value-of select="ddwrt:NameChanged(string(*[name()=$dvt_groupfield] | @*[name()=$dvt_groupfield] | current()[name(.) = $dvt_groupfield]), 0)" /></xsl:otherwise>

</xsl:choose>

</xsl:when>

<xsl:otherwise></xsl:otherwise>

</xsl:choose>

</xsl:variable>




Note: Owner is the people on which grouping is done

SharePoint Fantastic 40 templates:


SharePoint Fantastic 40 templates:

Here is the link :
http://www.wssdemo.com/application/default.aspx

Cheers !

SharePoint internet sites

SharePoint Internet Sites By Industry:
http://www.wssdemo.com/SitePages/SitesByIndustry.aspx

New SharePoint Websites:
http://www.wssdemo.com/SitePages/New%20Sharepoint%20Websites.aspx

Thursday, May 27, 2010

How to embed video in SharePoint page

Here are the steps, how to add video(media file) on Sharepoint page:

Add a content editor webpart, go to content source & insert following code:
<div align="center"><embed src="test.wmv" loop="false" autoplay="false" width="800" height="640" enablecontextmenu="false"></embed></div>

Other attributes we can set:
AutoRewind="True/False"
SendOpenStateChangeEvents="True/False"
ShowControls="True/False"
ShowTracker="False/True"
showstatusbar="True/False"
enablecontextmenu="false/true"
TransparentAtStart="True/False"
TransparentOnStop="True/False"
showPositionControls="False/True"
windowlessvideo="1"

Note: replace the test.wmv with your relevant video path & modify other attributes as per your requirement.

Microsoft SharePoint 2010 & related resources download links

Microsoft SharePoint Server Standard 2010 Trial :
http://www.microsoft.com/downloads/details.aspx?familyid=22F68C37-9904-4C74-8E69-5DF025D73F0F&displaylang=en

Microsoft SharePoint Server Enterprise 2010 Trial:
http://www.microsoft.com/downloads/details.aspx?familyid=230ECDFB-89EC-4D4A-8A85-89FD98329F7B&displaylang=en


Microsoft SharePoint Server 2010 for Internet Sites, Standard Trial:
http://www.microsoft.com/downloads/details.aspx?familyid=895A1DBA-0C3F-47A0-8D6D-163B50364335&displaylang=en

SharePoint Server 2010 for Internet Sites, Enterprise Trial:
http://www.microsoft.com/downloads/details.aspx?familyid=43325E40-8934-4C78-AC44-5F0EEB1D42A5&displaylang=en

Microsoft SharePoint Foundation 2010:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=49c79a8a-4612-4e7d-a0b4-3bb429b46595


Microsoft SharePoint Designer 2010 (32-bit):
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=d88a1505-849b-4587-b854-a7054ee28d66

Microsoft SharePoint Designer 2010 (64-bit):
http://www.microsoft.com/downloads/details.aspx?FamilyID=566d3f55-77a5-4298-bb9c-f55f096b125d&displaylang=en


Sharepoint 2010 Developer Training Kit:
http://www.microsoft.com/downloads/details.aspx?familyid=83A80A0F-0906-4D7D-98E1-3DD6F58FF059&displaylang=en

SharePoint Server 2010: Advanced Developer Training Presentations:
http://www.microsoft.com/downloads/details.aspx?familyid=22882429-EE80-40BB-BA8D-FF55D6E33959&displaylang=en

SharePoint 2010: Professional Developer Evaluation Guide and Walkthroughs:
http://www.microsoft.com/downloads/details.aspx?familyid=CFFB14E8-88A9-43BD-87AA-4792AB60D320&displaylang=en

SharePoint 2010: Getting Started with Development on SharePoint 2010 Hands-on Labs in C# and Visual Basic:
http://www.microsoft.com/downloads/details.aspx?familyid=C010FC68-B47F-4DB6-B8A8-AD4BA33A35C5&displaylang=en

SharePoint 2010 Reference: Software Development Kit:
http://www.microsoft.com/downloads/details.aspx?familyid=F0C9DAF3-4C54-45ED-9BDE-7B4D83A8F26F&displaylang=en

Wednesday, May 26, 2010

Sharepoint Designer 2007 workflow error occurred on Update List Item when field type is Person/Group

Issue:
Sharepoint Designer 2007 workflow error occurred on Update List Item when field type is Person/Group
Solution:
Follow these steps to find an alternate solution:
  • Add a new workflow variable of type string.
  • Add a new workflow step at the begining of the workflow.
  • Copy the value from the people field to the variable.
  • Use the build dynamic string action to add this string to the beginning of the variable -1;# (and the original value of the variable after the string using a lookup)
  • Use the variable in the action that require the value from the people field.

Compare Dates in XSL of DataView webpart

The dates within XSL can not be compared directly. Following is the example how it can be done :

<xsl:if test="number(translate(substring-before(ddwrt:FormatDate(@Created,1053 ,5), ' '), '-', '')) = number(translate(substring-before(ddwrt:TodayIso(), 'T'), '-', ''))" >
< xsl:value-of select="@Title"/>
</xsl:if>

In this example @Created field(SharePoint List column) is compared with current date(TodayIso()).

Sunday, May 9, 2010

MOSS 2007 - Save sub site as a template

If you are trying to save a site as a template in WSS v3 or MOSS 2007 you will find that the link "Save site as template" is only available under Look and Feel at the Top Level of the site collection. Doesn't really help if you want to save a sub site as a template now does it? If you would like to save a sub site as a template you need to append _layouts/savetmpl.aspx to your sub sites url. I am guessing Microsoft just forgot this link and it will be around by the time we go RTM.

If your subsite is :

http://server/sites/site1/site11/default.aspx

You would go to

http://server/sites/site1/site11/_layouts/savetmpl.aspx

and then you would be able to save the site as a template.