Monday, November 16, 2009

Enterprise Search User Group GRAND OPENING!

This is very exciting for me to announce the grand opening of the Enterprise Search User Group. This is NY based User group, but we are getting technology to record the meeting and make it available on-line.

Here is the “official” description of the group

The site is still work in progress, but we will get there :-)

Out first meeting is on December 9, 2009

Welcome time 5:30 PM.

It is important to register as building security is pretty strict and will not let people that are not on the list inside the building.

Register now!

Topic: How Microsoft and FAST are defining Next Generation Search

Microsoft made a big bet on enterprise search with its acquisition of FAST in 2008. The powerful FAST Enterprise Search Platform (ESP) is now the centerpiece of Microsoft’s enterprise search strategy and will be the foundation for search in future versions of Microsoft SharePoint, as well as stand-alone enterprise search offerings. In this session, you'll get a front seat view at how this game-changing search technology offers new opportunities to provide better search solutions to both your colleagues and your customers, emphasizing why you should care in the first place (hint – money and productivity). We'll also reveal Microsoft's product plans for search within the SharePoint 2010 platform and beyond, and discuss practical steps you can take in order to take advantage of Microsoft’s new strategy immediately today, whether you’re running MOSS, planning to upgrade to SP2010 or use FAST ESP stand alone. We’ll be sure to leave plenty of time to have an open discussion with user group participants to talk about your specific situation.

Speaker: Nathan Treloar, Principal Search Technology Evangelist in the Microsoft Enterprise Search Group

http://www.sharepointgroups.org/enterprisesearch/default.aspx

I will see you there :-)

Wednesday, November 11, 2009

SharePoint Shop Talk Tomorrow (11/12) from 12:30PM to 1:30 PM EDT

This is a repost form Paul Galvin’s blog.

The next SharePoint Shop Talk takes place tomorrow at 12:30 PM EDT.

This is a free event to anyone that has a telephone.  A panel of SharePoint pro’s take questions and do their best to provide useful guidance and advice.  We regularly hijack audience members and make them answer questions and try to have a good time.

Send your questions or topics to questions@sharepointshoptalk.com.

Register here: https://www.livemeeting.com/lrs/8000043750/Registration.aspx?pageName=sx9p9r6prwxp5mk9

Monday, November 9, 2009

Vertical Bar Graph in Data View Web Part (DVWP)

I recently had to work with the following scenario:

Clinical Trial site for weight loss study, on the site as part of the functionality patients had to track their weight loss weekly. As part of their weight loss dashboard it was a nice touch to add a simple bar graph that would visually help them to see their progress.

End result:

image

End By clicking on the link on the bottom “Enter New weight measurement” they would get to the following screen (See image bellow):

image

Entering new weight is pretty obvious, it is Data View Web Part (DVWP) with insert new item functionality. The bar graph is DVWP as well but XSLT was modified so that every row in a “Weight Tracker” list is presented as a column instead of conventional row style.

How does it work?

I have a simple list “Weight Tracker”

Columns:

  1. Title (renamed to Weight) – is used to hold weight value in pounds
  2. Date – Contains the date when the measurement took place.

In SharePoint Designer (SPD) I opened dashboard page and inserted DVWP that uses Weight Tracker list as source.

Selected my title and date columns to show up and sort by date.

Next I have modified the XSL to create a column for each row. I’ve searched on the internet for examples like this one, where you need to create column (in DVWP) for each row in the list and create row (in DVWP) for each column that you display in the DVWP. Unfortunately nothing came up beyond all the stuff that had been copied from Fab. 40 templates.

Here is the code, hope it will help someone.

BTW, it took a bit over 30 minutes to configure that bar graph.

<WebPartPages:DataFormWebPart runat="server" ShowWithSampleData="False" AllowRemove="True" AllowHide="True" SuppressWebPartChrome="False" PartImageLarge="" ViewContentTypeId="" ExportMode="All" Dir="Default" MissingAssembly="Cannot import this Web Part." ID="g_7dec9695_2438_4cbe_94e7_cb233f1c5352" IsIncludedFilter="" DetailLink="" AllowEdit="True" UseSQLDataSourcePaging="True" HelpMode="Modeless" IsIncluded="True" Description="" NoDefaultStyle="TRUE" FrameState="Normal" AllowConnect="True" ViewFlag="0" AllowZoneChange="True" AllowMinimize="True" Title="Weekly Weight Tracker (past 3 months)" PartOrder="1" PageSize="-1" FrameType="Default" HelpLink="" PartImageSmall="" ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="True" IsVisible="True" __MarkupType="vsattributemarkup" __WebPartId="{7DEC9695-2438-4CBE-94E7-CB233F1C5352}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><ParameterBindings>
                   <ParameterBinding Name="ListID" Location="None" DefaultValue="{D399E205-25E8-4A13-A076-CBDF2B1CB76D}"/>
                   <ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
                   <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
                   <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
               </ParameterBindings>
<DataFields>@Title,Weight;@Date_x0020_Submitted,Date Submitted;@Date,Date;@Chart_x0020_Bar,Chart Bar;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;</DataFields>
<DataSources>
<SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Leq&gt;&lt;FieldRef Name=&quot;Date&quot;/&gt;&lt;Value Type=&quot;DateTime&quot;&gt;&lt;Today/&gt;&lt;/Value&gt;&lt;/Leq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;" UseInternalName="true" ID="dataformwebpart1"><SelectParameters><WebPartPages:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{D399E205-25E8-4A13-A076-CBDF2B1CB76D}"/></SelectParameters><UpdateParameters><WebPartPages:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{D399E205-25E8-4A13-A076-CBDF2B1CB76D}"/></UpdateParameters><InsertParameters><WebPartPages:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{D399E205-25E8-4A13-A076-CBDF2B1CB76D}"/></InsertParameters><DeleteParameters><WebPartPages:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{D399E205-25E8-4A13-A076-CBDF2B1CB76D}"/></DeleteParameters>
    </SharePoint:SPDataSource>
</DataSources>
<Xsl>
<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">&apos;</xsl:param>
    <xsl:param name="Today">CurrentDate</xsl:param>
                            <xsl:variable name="dvt_1_automode">0</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">2ColCma</xsl:variable>
                                            <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
                                            <table align="center" border="0" class="ms-vb">
                            <xsl:call-template name="dvt_1.body">
                                            <xsl:with-param name="Rows" select="$Rows" />
                            </xsl:call-template>
                                                                    </table>
                            </xsl:template>
                            <xsl:template name="dvt_1.body">
                                            <xsl:param name="Rows" />
                                            <tr valign="bottom">
                                            <xsl:for-each select="$Rows">
                                                            <xsl:call-template name="dvt_1.rowview" />                                                    </xsl:for-each></tr>
                                            <tr>
                                            <xsl:for-each select="$Rows">
                                                            <xsl:call-template name="dvt_2.rowview" />
                                            </xsl:for-each>
                                            </tr>
                            </xsl:template>
                            <xsl:template name="dvt_1.rowview"> <!-- For Bar Graph row-->
        <td valign="bottom" align="center">
            <xsl:text disable-output-escaping="yes">&lt;table height=&quot;100%&quot; border=&quot;0&quot; valign=&quot;bottom&quot; width=&quot;20&quot;&gt;&lt;tr&gt; &lt;td&gt;</xsl:text> <xsl:value-of select="@Title" /><xsl:text disable-output-escaping="yes">&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;bottom&quot;&gt;&lt;div style=&quot;background:#FF9900;height:</xsl:text><xsl:value-of select="@Title" /><xsl:text disable-output-escaping="yes">px;width:20px;font-color:white;&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</xsl:text>
                            </td>
                            </xsl:template>
                            <xsl:template name="dvt_2.rowview"> <!-- For dates Row-->
        <td valign="bottom" align="left" width="20" bgcolor="#CCCCCC" class="ms-vb">
            <xsl:value-of select="ddwrt:FormatDate(string(@Date) ,1033 ,1)" />
                                            </td>
                                </xsl:template>

                </xsl:stylesheet></Xsl>
</WebPartPages:DataFormWebPart>

Enjoy :-)