SPSRollUp Chart Task Report

- 2 mins read

Using the previous sample, you can connect the crawled lists with a SPSRollUpChart to show a resume graph with the status of all tasks.

Our goal is show a chart with the status of all tasks in a specified task list. First create a SPSRollUp to select the lists as this

Add a SPSRollUpChart webpart an fill the properties with the same lists and in the fields property write “Status”, because we want get the status of the tasks.

This is a small sample to show all crawled lists, only the lists names without any other data.

Suppose that you want get all lists crawled under a specific site, send the list to another SPSRollUp webpart to show the lists items.

In this example we will use any site and we wish get all tasks related lists.

In the SPSRollUp properties, type “Tasks” in the lists properties and put “Title” in the fields property (we are not going to use the “Title” field but we need it, SPSRollUp must have almost one field in order to run the rollup)

SPSRollUp Task Diffs

- 2 mins read

It’s another SPSRollUp Sample that show data from a tasks list in subsites. This view permits expand and collapse data and show the startdate, the duedate and the days from startdate to duedate.

In the SPSRollUp Properties, select the necesary tasks lists, use the fields, Title,StartDate,DueDate and select the ‘Use ISO dates’. In the XSL use the code below

This example use the DateDiff function from the SPSRollUp Namespace.

SPSExplorer 2.5

- 1 min read

We have finished a maintenance release of SPSExplorer webparts, now SPSDocumentExplorer can be used with SPSCutCopyPaste.

Good Practices

- 5 mins read

Cenando

El otro día paso Unai por Pamplona y estuvimos cenando y departiendo sobre todas esas cosas frikis que nos gustan. Una suerte para los que habéis podido asistir a los cursos que ha impartido de Entity Framework y WCF.

Durante la cena, [[degustábamos unos “Penne Arrabiata” (no seáis mal pensados, que son macarrones con tomate un poco picante) y un “Ochoa Tempranillo” (recomendado)]], hablamos de; libros, de código, de más código, de bugs, de depuración, de tecnología, del bien y del mal (lo típico), no sé si ayer hablamos de sexo (no me acuerdo, pero con el frio que hacía es posible que no :-) .

Books

- 2 mins read

He terminado de leer el último libro de Robert C. Martin, Clean Code.

De Robert, había leído otros dos libros, “UML para programadores Java”, una guía práctica y sin rodeos de cómo usar UML en proyectos reales; y cuando digo práctica es que no se anda por las ramas y en ocasiones en un tono incluso “irónico” explica perfectamente cómo debemos usar UML.

El otro libro es Agile Principles, Patterns, and Practices in C# (Robert C. Martin Series), que puedo decir de este libro ampliamente comentado, uno de los que se deben tener. (Ya sabéis que se lo recomiendo a todo el mundo)

Sharepoint Unit Testing

- 7 mins read

Como sabéis tanto Gustavo como yo llevamos tiempo realizando pruebas sobre lo que programamos en SharePoint, ambos estamos usando TypeMock como framework para nuestros objetos Mocks que son imprescindibles a la hora de realizar pruebas para SharePoint.

Durante los últimos meses hemos posteado sobre el tema, hemos iniciado un proyecto en CodePlex con un conjunto de clases envoltorio que pueden ayudarnos a la hora de realizar las pruebas con TypeMock y que está a un tris de quedarse obsoleto.

csegRollUp 3.0

- 1 min read

We have prepared the new SPSRollUp v3 in few days.

  • Improved performance
  • Now there is not necessary to apply changes twice.
  • New Xslt functions. Added FormatIsoDate, LookupValue, LookupId, Replace, RootWebUrl, SourceParam, UrlParam, XmlDecode (more information in SPSNamespace functions)
  • New View Lists and View Fields options to show crawled lists and fields.

Now there are two options in the configuration properties that will show a popup with the information about collected lists and fields.

Unit Testing

- 10 mins read

Aquí continúa el drama de Unit Test para SharePoint. Esta vez hemos reunido esfuerzos entre nosotros, Carlos Segura (http://www.ideseg.com ) y Gustavo Velez (http://www.gavd.net ), para intentar sacar algo en claro. Programadores del mundo de SharePoint, uníos! …

Unit Test, SharePoint y que es lo importante:

Testeo Unitario es una técnica de programación que permite asegurar que lo que se ha programado hoy cumple las condiciones exigidas, y que las seguirá cumpliendo en el futuro, cuando se hagan modificaciones en el código fuente. Existe numerosa información al respecto, tanto en libros de texto como en internet, así que no repetiremos las bases de la técnica; en resumen, es deseable que se cumplan algunas condiciones:

SPSRollUp Dropdown Recipe

- 2 mins read

In a blank page insert two SPSRollUp webparts.

Edit the properties in the first webpart and select any list, in the fields property write “Title”

In the XSL paste the next snippet; This snippet fills a drop down box with the titles of all crawled data

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 
                xmlns:xsl="<http://www.w3.org/1999/XSL/Transform>" 
                xmlns:sps="<http://schemas.spsprofessional.com/WebParts/SPSXSLT>" 
                exclude-result-prefixes="sps">
  <xsl:output method="html" />
  <xsl:param name="CurrentRow" />
  <xsl:template match="/">
    <script type="text/javascript">
function combo_onchange(oSelect)
{
 if(oSelect.selectedIndex != -1)
 {
  var selected = oSelect.options[oSelect.selectedIndex].value;
  <xsl:value-of select="sps:EventJS('Select','selected')" />
  }
}
    </script>
    Select a value
    <select id="a1" name="combo" onchange="javascript:combo_onchange(this);" class="ms-input">
    <option value="" />
    <xsl:for-each select="Rows/Row">
       <xsl:sort select="Title" />
       <xsl:element name="option">
         <xsl:attribute name="value">
            <xsl:value-of select="_RowNumber" />
         </xsl:attribute>
         <xsl:if test="_RowNumber=$CurrentRow">
            <xsl:attribute name="selected" />
         </xsl:if>
         <xsl:value-of select="Title" />
      </xsl:element>
    </xsl:for-each>
  </select>
 </xsl:template>
</xsl:stylesheet>

When a value is selected the JavaScript embedded in the XSL “combo_onchange” send the selected value using the row provider interface.