Archive for Sharepoint
Mostafa Elzohgbi presenting at Microsoft’s 2010 MVP Summit
Posted by: | Comments
MetroStar Systems is pleased and proud to announce that our team member, Mostafa Elzohgbi, will be presenting at Microsoft’s exclusive 2010 MVP Global Summit which takes place February 16-19, 2010 at Microsoft Headquarters in Redmond, Washington.
Mostafa’s presentation will cover both C# and Sharepoint with his session titled “LINQ in Sharepoint 2010 Development.”
He will be joined by over 1,300 of the world’s top leaders from Microsoft’s MVP technical community who represent 96 countries, 37 languages, and span 94 Microsoft Technology areas. Microsoft’s Most Valuable Professional (MVP) Program, in it’s 17th year, recognizes and awards individuals for their exceptional commitment in helping improve Microsoft’s products and in helping people around the world make the most of their Microsoft technology. You can read more about Mostafa’s MVP recognition here: http://blog.metrostarsystems.com/2009/07/02/metrostar-systems-employee-receives-exclusive-microsoft-award/
You can follow the conversation around the 2010 MVP Global Summit by searching the #MVP10 hashtag and by following @MVPAwardProgram on Twitter.
For more information, you can also visit these links and resources:
Walkthrough: DVWP Tooltip
Posted by: | CommentsTooltips may be implemented to greatly improve user experience in many scenarios. This walkthrough will provide a method with which tooltip functionality may be implemented on SharePoint Data View Web Parts (DVWPs) using XSL and JavaScript.
Preparation
- Open the SharePoint site in SharePoint Designer 2007
- Open the page on which the tooltip functionality will be implemented
- Enable either Split or Code view
Create the Tooltip
- Locate the DVWP in which the tooltip functionality will be implemented
- Locate the XSL template “dvt_1.rowview” within the DVWP
Example <xsl:template name=”dvt_1.rowview”> This XSL template specifies what is rendered for each List Item displayed in the DVWP. A tooltip will be rendered for eash List Item and therefore should be added to this template.
- Locate where the tooltip should appear
No consideration for spacing of the tooltip should be taken into account. The tooltip will utilize the position style value “absolute” to display over other page content. - Insert the blank tooltip
Example <div style=”position:absolute;display:none;margin-top:14px;white-space:
»nowrap;overflow:visible;border:silver 1px solid;background-color:
»white” class=”ms-listdescription”>
<xsl:attribute name=”id”>tooltip_<xsl:value-of select=”@ID”/>
»</xsl:attribute>
<xsl:attribute name=”onmouseenter”>javascript:this.style.display=
»’none’;</xsl:attribute>
</div>» – unintended line break The tooltip may be any HTML object and is not limited to the DIV object. The tooltip HTML object must have the id attribute set as shown in the provided example. The position and display style attributes should be set as shown in the provided example. Setting the position style attribute to “absolute” allows the tooltip to display over other page content. The onmouseenter attribute (as shown in the provided example) hides the tooltip if the user moves the cursor onto the tooltip.
If multiple DVWPs on the same page will use the tooltip functionality, the id attribute of tooltips must be made distinct in each DVWP. For example, tooltips in a DVWP on the List “Transactions” could use the id attribute convention: tooltip_transactions_[List Item ID]. Thus, tooltip id attributes that may have been “tooltip_14″ and “tooltip_14″ may now be “tooltip_transactions_14″ and “tooltip_reports_14″.
- Set the tooltip text
Example <xsl:choose>
<xsl:when test=”string-length(string(@Tooltip))=0″>
<xsl:text>No tooltip.</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select=”@Tooltip” disable-output-escaping=”yes”/>
</xsl:otherwise>
</xsl:choose>If the tooltip references a List Item column that is not required (i.e. may be empty), it is suggested that empty values be handled as shown in the provided example. List columns must be referenced by their internal name. Setting the disable-output-escaping attribute to “yes” will display special (i.e. escaped) characters properly (i.e. unescaped). Please note that the provided example references a custom (i.e. non-standard) column called “Tooltip”.
The tooltip should be located like:
As a result of setting the position style attribute to “absolute”, the tooltip renders like:
Create the Tooltip Triggers
- Locate the DVWP in which the tooltip has been created
- Locate the XSL template “dvt_1.rowview” within the DVWP
Example <xsl:template name=”dvt_1.rowview”> This XSL template specifies what is rendered for each List Item displayed in the DVWP. Each tooltip trigger (i.e. system response to a user action) will show /hide the tooltip in the same row (i.e. TR object) as itself. Therefore, the tooltip trigger should be located within this template.
- Locate the HTML object that will trigger the display of tooltips in response to a specified user action.
- Insert the tooltip triggers
Example <td>
<xsl:attribute name=”onmouseenter”>javascript:var tooltipObj=document.
»getElementById(‘tooltip_<xsl:value-of select=”@ID”/>’);tooltipObj.
»style.left=event.clientX;tooltipObj.style.top=clientY;tooltipObj.
»style.display=”;</xsl:attribute>
<xsl:attribute name=”onmouseleave”>javascript:document.getElementById(
»’tooltip_<xsl:value-of select=”@ID”/>’).style.display=’none’;
»</xsl:attribute>
<xsl:value-of select=”@Title”/>
</td>» – unintended line break Tooltip triggers are inline JavaScript that find and display the tooltip appropriately. The tooltip is shown by setting its display style attribute to null and hidden by setting its display style attribute to “none”. The provided example shows the tooltip when the user moves the cursor onto the Title column’s parent TD and hides the tooltip when the user moves the cursor off the title column’s parent TD. Please note that the tooltip triggers are applied to the column’s parent TD to provide an optimal user experience. The provided example displays the tooltip at the point where the user moved the cursor onto the parent TD (rather than always below the parent TD content).
Example
Configuring Custom Fields in SharePoint Advanced Search
Posted by: | CommentsIntroduction
This blog will show how to add the custom fields to the MetaData Properties in Central Admin as well as adding them to the Advanced Search page. It will also detail how to add the advanced search button to your site’s search box. This will allow for your customers/clients to search on the fields that they know and understand when migrating a system or creating a new system for an old issue.
Configure Central Admin
The below is a step by step process for adding these fields to the MetaData Properties section of search administration. You will need to be logged into the Shared Service Provider admin page inside Central Admin.
Select Search Administration from the SSP Administration page:

Figure 1 Search Administration
Select MetaData Properties from the Left Navigation Area:

Figure 2 MetaData Properties
Performing Date/Time Calculation in DVWP Using XSL
Posted by: | CommentsSharePoint Data View Web Parts (DVWP) may be leveraged to use complex conditional logic using XSL. Such an example would be to highlight List Items in the DVWP that meet certain date/time criteria. The following example will show how XSL may be leverage as a simple and robust solution.
Case:
New tasks (i.e. List Items created within the last 30 minutes) in a User’s “My Tasks” DVWP are highlighted to bring attention to these high priority items.
Undesireable Solution:
Use a declarative workflow to check if the task is no longer new and reset a new ”flag”. XSL will check the “flag” when the DVWP renders and display tasks appropriately.
The workflow would follow the logic:
- Start on Item creation
- Pause for 30 minutes
- Set hidden boolean field value (isNew) to false
The DVWP then uses XSL to check the value of isNew to set the CSS class of a TR, TD, or some other HTML DOM element:
<xsl:if test=”@isNew = 1″><xsl:attribute name=”class”>newTask</xsl:attribute></xsl:if>
This solution is not optimal as a long-term workflow runs on every List Item. As a result, numerous workflows may be running on the server causing decreased server performance.
Solution:
Use XSL to check if a Task is new and set the CSS class appropriately when the DVWP renders.
Logic
For simplicity of the XPath expression, a task may be considered new if both of these conditions are true:
- The date of creation is the current day (i.e. today)
- The time of creation occurs less than 30 minutes before the current time (i.e. now)
(This logic will not handle Tasks assigned from 23:41 to 23:59 as new after 00:00 of the next day. Such Tasks may be handled with a seperate XPath expression to properly determine their new condition.)
ODC Creation in Excel 2007
Posted by: | CommentsODC creation is a valuable tool in Excel. It is a function that is wizard based and has some extensible features such as inputting SQL Query’s to get specific data sets within the Database. This document will explain how to properly create and store ODC files to build Excel Pivot Tables and Charts against Data Sets.
ODC Files in Excel
The below is a step by step ODC creation guide with Screen Captures. If there are any questions please contact the Author of this Document. This example is Oracle DB related.
After Opening Excel 2007, click the Data Tab on the Ribbon:

Figure 1 Data Tab
Once the data tab has been opened click on the “From other Sources” button:

Figure 2 From Other Sources
Select the Data Connection Wizard which opens a wizard for connecting to the data sources not listed to the right of the “From Other Sources” button or on the Other Data Sources Drop down menu.

Figure 3 From Other Sources Wizard selection








