Sorting

A sorting template will be applied to the entries in the Details or Signature screen if a template is defined in the preference itemsPlannedLocalExtraSortingTemplate. The template must provide the sorting value for each entry. The extra value of an attachment is provided as within the itemsPlannedLocalExtraSignatureTemplate, i.e. the extra value is stored in a separate Extra element underneath the Data element containing the enriched localExtra document. Note that this template overrules the orderAttachmentList preference value.

itemsPlannedLocalExtraSortingTemplate
Type Default Value Example Android HTML 5
XML Undefined See below + -

Example

Supose the the extra field of a task attachment contains the following content:

<Data floor="First floor" room="A11">
</Data>

and the Mobile UI for this attachment contains the attributes attribute1 and attribute2.

The enriched localExtra document used for the transformation would then contain the following XML document:

<Data planned=".."format=".."content=".."reference=".."unitOfMeasure=".." processFlow=".."subtype=".."language=".."attribute1=".."attribute2="..">
       <Extra>
          <Data floor="First floor">
          </Data>
       </Extra>
</Data>

Along with the sorting template

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">   
  <xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
  <xsl:template match="Data"> 
       <xsl:value-of select="Extra/Data/@floor" />-<xsl:value-of 
       select="Extra/Data/@room"/>
  </xsl:template>
</xsl:stylesheet>

the resulting sorting value is First floor-A11.

results matching ""

    No results matching ""