Welcome to TechNet Blogs Sign in | Join | Help

Building a Pivot View Web Part based on Multi-value Column

    Problem:

    Building a dynamic tree of a list based on a choice column (with multi-value select enabled, i.e. checkboxes) can't be done using views and Group By.  Simply because Group By does not list columns with multi-value select in its options.

     

    So, if you have a list with the following information:

     

    clip_image001

     

    You can build a view to group by Status (Choice as Dropdown or Radios), but not group by Competency (Choice as Checkboxes).

     

    Solution (or workaround if you like)

    In brief, the solution to this is to use a Data View Web Part (connected to the list), and use a custom XSL transformation which pivots according to the multi-value column, to get something like this:

     

    clip_image002

     

    The outline is as follows:

    1. Create a list with a column of type Choice (as checkboxes)
    2. Create a Data View Web Part in SharePoint Designer from this list
    3. Build the XSLT to enable pivoting on the choices available from 1.
    4. Use an dynamic script to enable a Tree View with expand/collapse capabilities.
    5. Save the new XSLT to the DVWP

     

     

    Details:

     

    Step 1:  Create a list with a column of type Choice (as checkboxes)

    Do I need to explain this?! Well I will share the list I have created so you can follow the columns design:

     

    Column

    Type

    Remarks

    Title

    Single line of text  

    Built-in

    Status

    Choice 

    Radio: In Progress, Proposed, Stalled

    Competency

    Choice 

    Checkbox: Software, Hardware, Services, Logistics

    Created By

    Person or Group  

    Built-in

    Modified By

    Person or Group  

    Built-in

     

    Step 2: Create a Data View Web Part (DVWP) in SharePoint Designer (SPD) from this list

    You have two ways to create a DVWP from a list in SharePoint.  You can drop a web part of the Stuff list above using the browser, and use SPD to convert that web part to a DVWP.  This is simply accomplished by right-clicking and choosing "Convert to XSLT Data View".

    Another way is to use SPD directly and drag the list (from the Data Sources) to a web part zone.  Both should give you the same result.

     

    Step 3: Build the XSLT to enable pivoting on the choices available from Step 1

    The idea here is to change the default XSLT and use another transformation that:

    • Keeps a list of choices as XML (that's a gotcha)
    • Loops through the list of choices doing the following:
      • Generating a header for each choice
      • Looping through all the rows in the list, and filtering according to the value of Choice.
      • Dumping those who match the header/choice as a list of items (or table rows, or spans, or ...)

     

    Remember that the idea behind XSLT is take the XML representing the SharePoint list data, and transforming it into HTML.  Whatever HTML tags you use is up to you.  I used <ul> and <li> because I wanted to make use of a ready made dynamic script that can transform that into a Tree View.

     

    See below the XSLT I used with the Stuff list.

     

    Step 4: Use an dynamic script to enable a Tree View with expand/collapse capabilities

    I actually have embedded that in the above XSLT.  I have used the Simple Tree Menu from DynamicDrive.

    You need to follow the instructions in the above site to include necessary files for like the CSS, Images, and Script files.  Here is what I did:

     

    1. Include the below in the "PlaceHolderAdditionalPageHead" content control.

    <script type="text/javascript" src="scripts/simpletreemenu.js">

    /***********************************************

    * Simple Tree Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)

    * This notice MUST stay intact for legal use

    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code

    ***********************************************/

    </script>

    <link rel="stylesheet" type="text/css" href="styles/simpletree.css" />

    1. Import the files to images, scripts, and styles folders under the root of my site, using SPD
    2. Change the references to images and scripts to match where I put them.  e.g. change the URL to "images/open.gif" in CSS, for instance.

     

    Step 5: Save the new XSLT to the DVWP

    Using SPD, right click on the web part in design mode and click Web Part Properties.  Change the XSLT using the XSLT Editor. 

     

    And you're done.  You should see the final result as shown above.

     

    Resources:

  XSLT:

The following is document and should be self-explanatory.

 

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">

<xsl:output method="html" indent="no"/>

<xsl:decimal-format NaN=""/>

<xsl:param name="dvt_apos">'</xsl:param>

<xsl:variable name="dvt_1_automode">0</xsl:variable>

<!--

The following variable lists all options available to pivot around.

the gotcha is that you need to update this, whenever yo change the schema of the list in SharePoint.

In other words, if you change the Choice column by adding/modifying/deleting value in SharePoint List Settings, then

you need to come back to this and synchronize it manually.

Let me know if you have a better approach.

-->

<xsl:variable name="Competencies">

<Competency Text="Software" />

<Competency Text="Hardware" />

<Competency Text="Services" />

<Competency Text="Logistics" />

</xsl:variable>

<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">

<xsl:call-template name="dvt_1"/>

</xsl:template>

<xsl:template name="dvt_1">

<xsl:variable name="dvt_StyleName">Table</xsl:variable>

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>

 

<xsl:call-template name="dvt_1.body">

<xsl:with-param name="Rows" select="$Rows"/>

</xsl:call-template>

 

</xsl:template>

<!-- the following is the main template which generates the skeleton of the pivot tree -->

<xsl:template name="dvt_1.body">

<xsl:param name="Rows"/>

<!--

An optinal HTML to have links to expan and collapse coming from Simple Tree Menu

More here: http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

-->

<a href="javascript:ddtreemenu.flatten('treemenu1', 'expand')">Expand All</a> | <a href="javascript:ddtreemenu.flatten('treemenu1', 'contact')">Contact All</a>

<!-- the container of the tree, and need to be marked with treeview style for trigeting the tree view script -->

<ul id="treemenu1" class="treeview">

 

<!--

looping through the options from the above XML varaible

You need to use the msxsl:node-set funation to build a node set from the variable

See MSDN for more info

-->

<xsl:for-each select="msxsl:node-set($Competencies)/Competency">

<!-- keep track of the competeny text value (Software, Hardware, ...) before going to another scope -->

<xsl:variable name="Competency" select="@Text" />

<li>

<!-- dump the value of competency in an list item <li> -->

<xsl:value-of select="$Competency"/>

 

<ul>

<!--

loop through all rows and call the group template which will handling the filtering

passing competency as a variable

-->

<xsl:for-each select="$Rows">

<xsl:call-template name="Competency.Group">

<xsl:with-param name="CompetencyValue" >

<xsl:value-of select="$Competency"/>

</xsl:with-param>

</xsl:call-template>

</xsl:for-each>

</ul>

</li>

</xsl:for-each>

</ul>

<!-- a script coming from Simple Tree Menu above -->

<script type="text/javascript">

//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))

ddtreemenu.createTree("treemenu1", true)

ddtreemenu.createTree("treemenu2", false)

</script>

</xsl:template>

<!-- this is a template that will do the real decision to include or not include a list item based on competency value -->

<xsl:template name="Competency.Group">

<xsl:param name="CompetencyValue"/>

<!-- only display competency when Comptency column contains the value -->

<xsl:if test="contains(@Competency, $CompetencyValue)">

<li>

<!-- dump the item data -->

<b><xsl:value-of select="@Title" /></b> : <xsl:value-of select="@Competency"/>

</li>

</xsl:if>

</xsl:template>

</xsl:stylesheet>

Posted by AQA | 0 Comments

Visual Studio Spoiled Me, and Web Parts Framework Made Me Learn

It took me sometime until I figured out some facts about Web Parts lifecycle.  The following are some findings I believe will make you rethink what methods and events to override to develop a Web Part:

 

  • CreateChildControls() is - from what it is - used to create controls for layout and content.  It's not meant to create the content itself or have manipulation logic.
  • Make sure you do all the stitching of Event Handlers to their respective controls in this method.
  • CreateChildControls()  is called all the time! whether on initializing or post back, it gets called.  So make sure you don't override anything while coding this method:
    • ViewState[] and Session[] can be used to track view state or persistent session information in the Web Part life cycle.
    • ViewState[] and Session[] should not be initialized in this method.  Use the constructor or OnInit() event for this purpose.
  • Your logic should go into events for those controls you're creating in CreateChildControls()
  • Ensure fetching data for your controls doesn't happen each time CreateChildControls() gets called.
  • It's better to utilize OnPreRender() event for this purpose, and protect the data fetch block with a condition to avoid executing on post backs. 
  • IsPostBack is not a trusted condition for the behavior in Web Parts, and this is because a post back can be triggered while in design mode, where the user has just added the web part!

 

Few posts that could be helpful:

http://www.codeproject.com/KB/sharepoint/WebPartLifeCycle.aspx

http://www.sharepoint-tips.com/2007/03/server-side-controls-and-data-binding.html

http://www.sharepointblogs.com/chadclarkesmossblog/archive/2007/10/10/custom-web-part-building-state-management-tips-and-tricks.aspx

 

Posted by AQA | 0 Comments

Using VSeWSS relieves you from custom intall.bat!

If you like to be more productive in WSS development, you can always use Visual Studio Extensions for Windows SharePoint Services 3.0.

Visual Studio 2005 -> VseWSS 1.1

Visual Studio 2008 -> VseWSS 1.2

Then, set the "Start Browser with URL" to your Web App URL.  With that, you can enjoy the Deply (solution packaging, deployment, and activation) funtionalities provided by the extensions. 

Always remember your SharePoint Development source: http://www.MSSharePointDeveloper.com!

SharePoint Development with Windows Server 2008 and IIS 7.0 - install.bat sample

Here is a sample batch file to help with your SharePoint development on Windows Server 2008 and IIS 7.0.  

@SET TEMPLATEDIR="c:\program files\common files\microsoft shared\web server extensions\12\Template"
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"
@SET GACUTIL="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"
@SET APPCMD="c:\windows\system32\inetsrv\appcmd.exe"

Echo Installing YOURASSEMBLY.dll in GAC
%GACUTIL% -if bin\debug\YOURASSEMBLY.dll

REM You can also deploy to local bin folder of the Web Application, if you don't want or not allowed to use GAC
REM Echo Copying YOURASSEMBLY.dll to Web App Bin
REM xcopy /y bin\debug\YOURASSEMBLY.dll C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin

Echo Copying files
xcopy /e /y TEMPLATE\* %TEMPLATEDIR%

Echo Installing feature
%STSADM% -o installfeature -filename  YOURFEATURES\feature.xml -force

Echo Recycling Application Pool
%APPCMD% recycle APPPOOL "SharePoint - 80"

Notes:

  • I have used Application Pool recycling instead of  restarting IIS, which gives faster development/test cycles. 
  • In IIS 7.0, appcmd.exe replaces the script file named iisapp.vbs, so if you're still in IIS 6 (Windows Server 2003), then use the following instead:
    cscript c:\windows\system32\iisapp.vbs /a "SharePointDefaultAppPool" /r
  • I have used the Windows SDK gacutil.exe, cause I'm running Windows Server 2008 and Visual Studio 2008.  If you're still using Visual Studio 2005, then you can find it here:
    c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe

-AQ

Posted by AQA | 0 Comments

Learning, Training, and Certification

Thought to share these resources for learning/training/certification.

Enjoy!

 

Home

clip_image002

Microsoft Learning Home

Learning Home

clip_image002

Learning Manager

A tool to plan and manage your learning and certificates. 

clip_image002

Learning Momentum

Online animated document for certification roadmaps

clip_image002

Office SharePoint Server Home

SharePoint Home on Microsoft Office Online

 

 

Learning Plans

clip_image003

 Learning Plan for Microsoft Office SharePoint Server 2007 Application Development

clip_image003

 Learning Plan for Developing Microsoft Windows SharePoint Services 3.0 Applications

clip_image003

 Learning Plan for Configuring Windows SharePoint Services 3.0

clip_image003

 Learning Plan for Configuring Microsoft Office SharePoint Server 2007

 

 

Courses

clip_image005

Course 5060

Implementing Windows SharePoint Services 3.0

clip_image005

Course 5061

Implementing Microsoft Office SharePoint Server 2007

clip_image005

Course 50047A

Advanced IT Pro for MOSS/WSS (5 days)

clip_image005

Course 50048A

Architecting Search (2 days specialization)

clip_image005

Course 50050A

Architecting ECM (2 days specialization)

clip_image005

Course 50051A

Architecting Portals & Collaboration (2 days specialization)

clip_image005

Course 50049A

Architecting Internet Publishing Site (2 days specialization)

 

 

 

Certifications –  Microsoft Certified Technology Specialist (MCTS)

clip_image007

Technology Specialist: Microsoft Office SharePoint Server 2007, Configuration

clip_image007

Technology Specialist: Microsoft Office SharePoint Server 2007, Application Development

clip_image007

Technology Specialist: Windows SharePoint Services 3.0, Application Development

clip_image007

Technology Specialist: Windows SharePoint Services 3.0, Configuration

 

 

Learning Collections (Mostly Online)

clip_image009

Collection 5385

Developing Solutions with Microsoft Windows SharePoint Services 3.0 and Visual Studio 2005

clip_image009

Collection 5392

Developing and Extending Microsoft Windows SharePoint Services 3.0 with Visual Studio 2005

clip_image009

Collection 5403

Implementing Microsoft Windows SharePoint Services 3.0

clip_image009

Collection 5404

Implementing Microsoft Office SharePoint Server 2007 

clip_image009

Collection 3376

Implementing Enterprise Search Using SharePoint Technologies

 

 

End User Training

clip_image011

SharePoint Server 2007 Help and How-to

clip_image011

SharePoint Server 2007 Demos

clip_image011

SharePoint Server 2007 Training

clip_image011

Office SharePoint Server 2007 End User TrainingPortal Edition, Standalone Edition

 

 

Training Partners

clip_image013

New Horizons

clip_image013

Pioneer-Solutions

clip_image013

U2U

clip_image013

Mindsharp

clip_image013

Developmentor

clip_image013

LearningTree

 

 

Books

clip_image015

Microsoft Windows SharePoint Services Version 3.0 Step by Step

(MS Press - Olga Londer, Todd Bleeker, Penny Coventry, Bill English)

clip_image015

Inside Microsoft Windows SharePoint Services Version 3

(MS Press - Ted Pattison, Daniel Larson)

clip_image015

Inside Microsoft Office SharePoint Server 2007

(MS Press - Patrick Tisseghem)

clip_image015

Microsoft Office SharePoint Designer 2007 Step by Step

(MSPress - Penelope Coventry)

clip_image015

Professional Microsoft Office SharePoint Designer 2007

(Wrox - Woodrow W. Windischman)

clip_image015

Real World SharePoint 2007: Indispensable Experiences From 16 MOSS and WSS MVPs

(Wrox - Editor: Scot Hillier. Authors: 16 MVPs (listed in description))

clip_image015

6 Microsoft Office Business Applications for Office SharePoint Server 2007

(MS Press - Microsoft [no author given])

clip_image015

Pro SharePoint Solution Development: Combining .NET, SharePoint and Office 2007

(Apress - Susie Adams, Ed Hild)

clip_image015

Professional SharePoint 2007 Development

(Wrox - John Holliday, John Alexander, Jeff Julian, Eli Robillard, Brendon Schwartz, Matt Ranlett, Dan Attis, Tom Rizzo)

 

And more …

 

 

Posted by AQA | 0 Comments

SharePoint Resources

Here's a tool to search for SharePoint resources available out there: http://sharepoint.microsoft.com/readiness

This is useful when you're looking for a specific type of content. Otherwise, you can use the following places:

Reference Sites: check when you need something about SharePoint

Kits to download and start using for developers:

Community Sites:

SharePoint Blog that you need to regularly check:

Posted by AQA | 0 Comments

SharePoint Conference 2008 in Dubai and Istanbul

clip_image002

We are pleased to announce that we are bringing the SharePoint Conference to the Middle East and Africa Region this year. The exclusive Microsoft SharePoint Conferences 2008 Dubai and Istanbul are part of the global SharePoint Conferences, following closely the US (Seattle) edition. These world-class, two-day conferences, will showcase the latest innovations, features and functionality for the 2007 SharePoint products and technologies.

The Microsoft SharePoint Conference 2008 Dubai and Istanbul will provide an unprecedented opportunity for customers and partners in the Middle East region to meet and network with the Microsoft Office System product development teams, fellow IT professionals and architects, and partners.

Choose your City and Register now !!

Dubai: http://www.sharepointconferencedubai.com

Istanbul: http://www.sharepointconferenceistanbul.com

SharePoint Conference at a glance

Who: The sessions content is targeted at IT DMs, IT Professionals and Architects. Seasoned SharePoint professionals as well as people that are new to SharePoint Products and Technologies will all learn something new! The content theme this year is “Real world guidance and experience”, we have top notch speakers lined up from Microsoft, our customers, our Partners and the MVP technical community all geared up to share their knowledge.
What: Since the release of Microsoft Office SharePoint Server 2007 one year ago, everyone from Microsoft product specialists to our customers and partners to industry analysts have all accumulated a wealth of real life product and deployment experience that we want to share with you! That’s why the SharePoint Conference 2008 is all about real world experience and guidance.
We have planned 30 sessions divided into 3 tracks:

· Deployment, Migration and Administration

· Enterprise Content Management, Collaboration and Social Computing

· Business Applications, Interoperability and Business Process Management

When: Dubai - 7th – 8th of April Istanbul 10th - 11th  April

Where:  Al Bustan Rotana Hotel Dubai      Swiss Hotel Istanbul
Why: Come spend 2 days with us and gain a deep understanding of many important aspects of SharePoint Products and Technologies from the people that work with the products day in day out. You’ll learn best practices from industry leaders and other Microsoft SharePoint customers for designing, deploying, supporting, governing and managing a robust SharePoint infrastructure along with real world guidance on building business critical applications on the SharePoint platform.

From The SharePoint Conference Team...

Posted by AQA | 0 Comments

Architecture Talk - SharePoint Farms

Microsoft Office SharePoint Server 2007 is highly scalable in both directions: vertical and horizontal.  The support for 64-bit architecture, multi-CPU/multi-core hardware, and large amounts of memory makes it possible to scale up boxes running SharePoint Server 2007.  The mere fact that SharePoint Server 2007 has a multi-tier architecture makes it possible to split its different components (called server roles) to different boxes.  Also, each role can be installed on redundant boxes to support failover. 

Referring to SharePoint Server TechCenter, you can find drill-down information for SharePoint Planning and Architecture and Deployment.  Both discuss various application scenarios of MOSS, with different sizing requirements.

A proper capacity planning and availability requirement analysis should take place to reach the best fit for your organization.  If that’s not possible then you can go for a small to medium-sized deployment and grow accordingly.  However, meeting the bar of redundancy, you may need to deploy SharePoint on more boxes than needed.

Farms in SharePoint can have any size with X x Y x Z number of servers, and these are recommended for production environments.  X is the number of Web Front Ends (Web Servers), Y is the number of Applications Servers (resource intensive servers like search, excel services, project, …), and Z is the number of Database Servers.   This is compared to single server deployment, where you have one server running all SharePoint components including the database, which I recommend only for development and testing environments. 

  1. Web-Front Ends receive the hits of users in order to serve web sites.  They also deliver forms and run the workflows.  If more than one server is used for this role, then load-balancing (via hardware or software load balancing) is needed.  However, SharePoint handles the introduction of new servers and how different content can be served on different servers via configuring and extending web applications.  Administrators need not worry about anything else, other than properly configuring NLB or the load balancers.
  2. Application Servers are used to for those intensive shared services like: index, query (search), and Excel calculation, and other shared services.  It's also preferable to push the front-ends of admin sites to these servers, like Central and SSP Administration.  You can have any number of servers to play the role of application servers (query, excel, project, ...) with the exception of Index server.  You can have one Index server in a SharePoint environment, however, this only affects indexing, since querying is a different role that can be redundant.  Simply, what you lose when an Index server is down is the index refresh which can be recovered quickly.  Searching will continue to function even if the Index Server is down.  Load balancing is not required as SharePoint will understand how to direct requests in the farm to different servers in this role.
  3. Database Servers run SQL Server to host and deliver the configuration database, and content databases.  This is however, a pure SQL Server installation (2000 with SP4, or 2005).  load balancing this role requires the use of clustering.
Posted by AQA | 0 Comments

InfoPath Usage Scenarios

Microsoft Office InfoPath 2007 can be used in different scenarios that can scale from simple, ad hoc forms, to highly managed centralized forms solutions.  The following gives a glimpse of the different scenarios with emphasis on value vs. shortcomings.

Forms in Email – quick ad hoc forms using InfoPath 2007 and Outlook 2007

  • Designers build InfoPath forms, and publish forms to email recipients
  • Recipients (users) fill in forms in InfoPath and submit to email of the form owner
  • Outlook organizes forms in folders, and generates Excel reports for further analysis

     

Value

Shortcomings

Simple and Quick

Form templates and submissions are scattered in mailboxes.  Defeating the centralized repositories concept.

No server components required

No web-based forms, only rich client available

Integrated with Outlook 2007 and easy reporting to Excel

No centralized management of form templates and submissions

 

No workflows

Forms Solutions using Windows SharePoint Services v3 – Team forms using InfoPath and WSS

  • Designers build InfoPath forms, and publish to Form Libraries in SharePoint (WSS)
  • Users create new forms and submit to SharePoint Form Libraries
  • Form Library stores form submissions, and enables reporting to Excel.
  • Workflows can be designed (using SharePoint Designer 2007) or developed (using Visual Studio 2005 with Extensions for Windows SharePoint Services)

Value

Shortcomings

One location to access and submit new forms

No web-based forms, only rich client available

Centralized form submissions on the server

No centralized management of form templates

The ability to assign workflows

No customized advance search capabilities

 

No ready-made workflows.  Designing/Developing workflows is required.

 

Forms Solutions using Microsoft Office SharePoint Server 2007 – Business Forms and Process Automation

  • Designers build InfoPath forms, and publish to Form Libraries in SharePoint (MOSS)
  • Users create new forms and submit to SharePoint Form Libraries using both InfoPath rich client, and Web-based forms generated by MOSS (InfoPath Forms Services)
  • Form Library stores form submissions, and enables reporting to Excel.
  • Out-of-the-box workflows are available (Approval, Collect feedback plus other .  Need custom workflows for medium to complex workflows.
  • Form templates can be managed centrally using MOSS (InfoPath Forms Services).  Management include central repository for templates, upgrade, and attachment to different sites.
  • Usually planned and deployed on an organization-wide scale.

     

Value

One location to access and submit new forms

Centralized form submissions on the server

The ability to assign workflows; ready-made workflows available

Web-based forms available.

Centralized management of form templates.

Customized advanced search capabilities

Capabilities of InfoPath are still available in all scenarios, such as:

  1. InfoPath can be connected to Web Services or Databases (Access and SQL Server) to provide automation of form field filling.
  2. Design Template Parts for reusing the design elements among a number of templates
  3. Declarative rules to automate filling and validation
  4. Form Views
  5. User Roles (only in Rich client)

Posted by AQA | 0 Comments

WSS vs. MOSS for External Sites

MOSS is the right choice to build sites that require Web Content Management. Understanding the breakdown of WCM (previously part of MCMS 2002) features will help appreciate what MOSS provides when building Internet sites or Intranet sites, which usually requires branding and publishing features:

WCM features that MOSS provides:

  • Publishing workflows – approval basically
  • Publishing templates – Corporate Internet Presence template, Search Center templates, Content Roll-up templates, ...
  • Scheduled publishing – putting schedules on pages to show/hide on specific dates.
  • Web Content editor – to allow knowledge workers to author content.
  • Page Editing toolbar - gives you a set of menus/commands to manage/edit a page's workflow, versions, etc.
  • Document Conversion – example would be converting a word document to a web page.
  • Page libraries – to host web pages of a site. Web Pages inherit Page Layouts (page templates) and use page fields (columns in page libraries) as placeholders for content.
  • Reusable Fragments – having a list of text and html fragments to be reused throughout the site. Examples are: copy right text, company slogan, a date of an event …
  • Site Variations - to build connected multilingual web sites.
  • Content Deployment - moving content from staging to production farms in bulk, manually or based on schedules.

 

Other features of MOSS that are not directly related to content publishing, but greatly affects deployments:

  • Enterprise Search: Search in WSS is limited to the local site collection, so you cannot search across multiple sites.  Also, you won't be able to search business data, people profiles, file shares, other SharePoint sites, and external sites. These are features of MOSS.
  • Site Directory - which aggregates a number of sites and lets you be able to manage the hierarchy.
  • The concept of shared services: User Profiles, Excel Services, BDC, Search, …

 

So does WSS have a bright side?

From a web application development perspective - YES. 

From a web content management perspective - NO.

You can use WSS from three different angles (or all together): building sites for collaboration (workflows, shared lists, workspaces are the tools), building sites for storage (lists and document libraries are the tools), building web applications with the former two in mind.  To see examples of Web Applications built on top WSS, check the Fabulous 40 Application Templates.

To build WCM-enabled sites with WSS only, you need to go the hard way:

Build workflows (you have the Windows WF framework), Build authoring components (Web Editor, Document Conversion, Reusable Fragments, …), templates and a placeholder framework, Multilingual sites framework.  You also need to build tools for content deployment.

By adopting MOSS 2007 with its WCM capabilities, partners/customers are relieved from building the above.

Posted by AQA | 0 Comments

Enabling Arabic Search in MOSS 2007

Does MOSS support Arabic Search?
This is the question I always receive from customers and partners. My answer always starts with the following:

The question should not be if MOSS does or doesn't support Arabic Search, cause the answer would be simply – YES, IT DOES.

The question should be: how powerful is MOSS Search when it comes to Arabic language?

I would like to pin-point a couple of whitepapers that is a must read for this subject. Afterwards, I'm going to go over the configuration steps required to reach the desired results.

Two whitepapers produced by our product teams that elaborate on multi-language support in Microsoft Office SharePoint Server 2007:

  • Building Multilingual Sites white paper: Talks about the overall features for building multilingual sites like language packs, site variations, and search components.
  • Arabic Word Breaker white paper, you can see that we provide morphological analysis for Arabic, with a good set of features.

Mike Taghizadeh's blog covers MOSS 2007 Search Capabilities. Two excellent blogs are worth reading about word stemming:

Here are some facts to summarize the above:

  1. Word breaker is the component of MOSS Search that does stemming.
  2. Word stemming (morphology) is composed of two things: morphological analysis, and morphological generation
  3. In turn, morphological analysis/generation is further composed of two things: inflectional, and derivational.
  4. Word breakers for different languages come shipped with MOSS 2007. They are NOT part of language packs.
  5. Stemming is off by default for Arabic (and some other languages). You need to enable stemming (at query time) from the Search Center. [see below]
  6. Stemming for a specific language is triggered by the language used in the client browser. [see below]

Enabling word stemming in MOSS 2007 - Search Center:

  1. Being the owner of administrator of the site, go to Search Center results page. (you can issue a query to go there, or navigate to results.aspx page)
  2. Edit the page: Site Actions -> Edit Page
  3. Got to the Core Results Web Part, and choose to modify this web part
  4. In the Web Part settings panel, check the option that reads "Enable word stemming …" under the Results Query options.
  5. Click OK, and save the page or publish it.

Now you have your search ready for word stemming at query time.

Testing Arabic word stemming by setting Arabic as the default language in IE:

MOSS 2007 has been designed to choose word breakers according to the language of the client browser. Browser will send HTTP_ACCEPT_LANGUAGE, with the default language set to MOSS. MOSS will in turn invoke word breaker for that specific language.

So to trigger Arabic word breaker, you need to change the IE language settings (Tools -> Internet Options -> Languages).  If Arabic is set as the default, MOSS will invoke Arabic Word Breaker, and will do the stemming at query time.  See the multilingual whitepaper above from more details.

Posted by AQA | 3 Comments

Removing Footer Elements from SharePoint List Items Display

To remove the footer elements (like Created By, Modified By, …) from list elements, you need to create new Custom List From using SharePoint Designer, and modify the output generated.
Here are the steps to do that, and thanks to Bergen for his blog Creating Custom Forms for SharePoint.

Step 1: Create a new Custom List Form, and edit it to remove the footer:

  1. Open the site in SharePoint Designer.
  2. Dive in to the tree to reach out your list folder. Usually under the Site Address/Lists
  3. Make a copy of DispForm.aspx Name it something like: MyDispForm.aspx
  4. Open the new MyDispForm.aspx
  5. Select the ListFormWebPart, and delete it.
  6. Click Insert -> SharePoint Controls -> Custom List Form…
  7. Choose you list or document library from the drop down list.
  8. Choose Type of form to create: Display item form (used to view list items)
  9. A new Data Form Web Part will be created.
  10. Delete the CreatedModifiedInfo control, using either:
    1. Design mode: click the control that shows the Created By and Modified By text, and delete.
    2. Code Mode: create the following tag:
      <SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server"/>
  11. Save the page.

Step 2: Introduce the new page to your List, and make it the default to display items:

  1. Right-click you list folder from the left navigation Folder List. Choose Properties.
  2. Under Supporting Files tab, under "Content type specific forms", Choose item or whatever you basic type is.
  3. Change the page for "Display item form", and choose the new created page MyDispForm.aspx
  4. Click Ok.
  5. Browse to you list and view an item, to see that the footer is no more displayed.

 

Posted by AQA | 0 Comments

InfoPath – Connecting two List Boxes to Reflect Parent-Child Relationship

If you're designing an InfoPath form, and need to connect two list boxes so that one reflects on the value chosen in the other, then you need to utilize InfoPath filters. Filters allow you to include a subset of the values taken from a given data source, to simplify form filling, or to reflect a business logic, like selecting a product under a given category.

The following will establish the steps required to do so. I'm taking the example of two list boxes that enable the user to choose a category of products, and then choose a specific product in that category. I'll be using declarative features of InfoPath, without the need to write any code.

Step 1: Create XML file to store your Category and Product Data:
Create a new XML file using notepad, or any XML editor, and type the following:

<ProductsCategories>
<categories>
    <category CatID="X">Category X</category>
    <category CatID="Y">Category Y</category>
    <category CatID="Z">Category Z</category>
</categories>
<products>
    <product CatID="X" ProdID="1">Product X.1</product>
    <product CatID="X" ProdID="2">Product X.2</product>
    <product CatID="X" ProdID="3">Product X.3</product>
    <product CatID="Y" ProdID="1">Product Y.1</product>
    <product CatID="Y" ProdID="2">Product Y.2</product>
    <product CatID="Z" ProdID="1">Product Z.1</product>
    <product CatID="Z" ProdID="2">Product Z.2</product>
    <product CatID="Z" ProdID="3">Product Z.3</product>
    <product CatID="Z" ProdID="4">Product Z.4</product>
</products>
</ProductsCategories>

Save the file under the name: prodcats.xml. We will use this file to build a data connection later.

Step 2: Design a New Form Template:
Start InfoPath 2007, and design a form with two list box controls. We are not going to use manually entered data, as InfoPath filters does not support filtering on manual entries. We are going to link the two list boxes to an external XML data source.

Step 3: Create an XML Data Connection to get Category and Product Data:

  1. Go to Tools -> Data Connections…
  2. Click Add, and choose Create New Connection to: Retrieve Data.
  3. Click Next
  4. Select XML Document as the source of data. Click Next.
  5. Browse for the XML file you created in Step 1: prodcats.xml, and click Next.
  6. You can choose to Access the data from the specified location, to allow you to dynamically change the values directly in the XML file. If you're going to use this option, then it's required to have a publically accessible location like a web server or a file share.
  7. You can also check Store a copy of the data for offline use, to not to require online connections to the XML file.
  8. Click Next, and then type a name to identify this data connection, and then click Finish.

Step 4: Link list boxes to the external XML data source

  1. Double click the Category control, to show its properties.
  2. In the List box entries section, under Data tab. Choose Look up values from an external source.
  3. In Data Source drop-down, choose Categories and Products that you've created in the previous step.
  4. Select XPath for the Entries to choose a specific field in XML. This is the little icon beside the Entries field.
  5. In the Select a Field or Group Dialogue, drill down in the XML data, and choose category. Click OK.
  6. Select XPath for the Value field. This time choose CatID, under category. Click OK.
  7. Do the same for Product control, but this time, choose product for the Entries and ProdID for the Value.

With the above steps, we have set the two list boxes to retrieve their list items from XML. The Category control will show: Category X, Category Y, and Category Z.
The problem with Product control is that it'll show all of the products regardless of the selected category.

The following step will show you how to filter data in Product control, according to the selected value in Category control.

Step 5: Filter Data for the Product List Box:

  1. Double click on Product control, to show its properties.
  2. In the List box entries section, click Select XPath icon beside Entries Field.
  3. In the Select a Field or Group dialogue, Click Filter Data.
  4. Click Add, to add a new filter.
  5. Choose CatID, the first drop-down. Choose "is equal to" in the second.
  6. In the third drop-down list, choose Select a field or group.
  7. Point to the Main data source, and pick the Category field. Click OK.
  8. Click OK, to close the Specify Filter Conditions.
  9. Click OK, to close the Filter Data.
  10. Click OK, to close your selection for Entries from the XML data.
  11. For the Value field, choose ProdID from the XML data source.
  12. OK to the list box properties.

Now, the Product control will show only items under the selected category.

Step 6: Apply a rule, to reset Product Control when Category control has no value selected:

  1. Go to Category control properties.
  2. Click on Rules, and click Add.
  3. Give a meaningful name for the rule. Example is: Reset Products if Category is Blank.
  4. Set Condition, and choose of Category is blank.
  5. Add Action, choose Set a field's value. Pick the Product field, and leave the value empty.
  6. Click OK, three times.

Preview the form, to see that whenever you choose a category, only those products that belong to the category will show in the Product drop-down list.

Note:
One list cosmetic action will be writing a piece of code and attach it to the Changed event of Category control. This will enable you to avoid strange values in Product when the user changes the category.

Posted by AQA | 2 Comments

Where SharePoint saves Data, and Can I add more Hard Disks?!

I once received a query saying: Can I add new hard drive to SharePoint environment, after it went live?
The guy who asked assumed that SharePoint is rigid in this regard, and that SharePoint has knowledge about logical to physical volume mapping. This is not the case, for SharePoint and most of other applications.

SharePoint is an application that is abstracted from the physical hardware, similar to other applications.  SharePoint has two kinds of storage:

  • File System folders: used for installation files, index files, and also for basic web content deployed to IIS.
  • SQL Server storage: All of SharePoint content and most of configuration data reside in SQL Server 2005 databases.  SQL Server 2005, in turn, saves its data to file system in terms of MDF and LDF files.

 

It's the Windows Server 2003 responsibility to manage the file system storage and map logical volumes (C:, D:, …) to physical volumes (Hard disks, …).  So, properly designed Windows Server 2003 environment can give you the flexibility of adding or removing physical disks, or can prevent you from doing so.

Given the above, and knowing how Windows Server 2003 manages its file system storage, then SharePoint Server 2007 has no control or even aware of what's happening beneath it.

The bottom line is: do proper planning for your Windows Server 2003 and SQL Server 2005 environment, especially when it comes to storage management. With that, your SharePoint environment will not suffer from space issues.

Posted by AQA | 0 Comments

Searching Columns in MOSS using Property Search and Advanced Search

Three basic steps to enable you to search against custom columns in document libraries, lists, … using the Advanced Search property dropdown list, or property search syntax.

   

Step1: Create Custom Column:

If you haven't created the column yet, then go to the document library (I'm assuming a Doc Lib, but anything should be fine)

  • Choose Settings -> Create Column
  • Fill in the Column name, and choose a type for it. I'm going to use "Text" in this case.
  • Click OK to save your changes.

Step 2: Introduce the column to Indexer by creating a "Managed Property":

Indexer crawls contents and retrieves what's called crawled properties. You have to define a managed property and map it to your crawled property definitions (basically columns, in this case). This way, you enable searching against properties you define.

  • Go to Shared Services Administration
  • Go to Search Settings -> Metadata Property Mappings
  • Click on New Managed Property. 
  • Type the property name, and choose its type
  • Click on "Add Mapping"
  • Look for the crawled property name, and click OK. 
  • Now you can see your managed property listed, showing the mapping you did. 
  • Do a Full Crawl, to enable this to be captured as part of the indexing process.
     

Step 3: Show Column in Property Dropdown in Advanced Search:

Last step is more a presentation modification. Here, we're going to modify the "Advanced Search" page, and allow the property dropdown list to show our newly managed property we defined above.
 

  • In the Search Center, click "Advanced Search"
  • Go to Site Actions -> Edit Page
  • In "Advanced Search Box" Click edit -> Modify Shared Web Part
  • Expand Properties, and click to modify the properties XML text.
  • Add two lines as follows:
    • Under <PropertyDefs>, add the following property definition:

      <PropertyDef Name="IndexMe" DataType="text" DisplayName="Index Me!"/>

    • Under <ResultType DisplayName="All Results" …, add a property reference to the property definition just defined

      <PropertyRef Name="IndexMe" />

    • You can do (ii) for other relevant Result Types. 
  • Click OK twice, and check in the advanced search page.


Conclusion:

Now, you can conduct search against you're defined columns, using the advanced search property dropdown. Also, you can conduct property search easily from the search box using the following syntax, which is going to give you the same results:

<some_text_to_search_for> <property_name>:<property_value>
e.g. technical proposal Project:ProjectA

 

Posted by AQA | 0 Comments
 
Page view tracker