Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Specify sortorder in Summary Report

Featured Replies

I would like to have a Summary Report sort by school year Month. So, I have a value list set up with August, September, October, etc

In the XSL for my Summary Report, I have the following lines generated from the Site Assistant.

xsl:comment>Display records in the current group-by section

xsl:for-each select="fmrs:resultset/fmrs:record[generate-id(.) = generate-id(key('_records-group-key', fmrs:field[@name=$_groupby-field-name]/fmrs:data)[1])]">

xsl:sort select="fmrs:field[@name=$_groupby-field-name]/fmrs:data[1]"/>

xsl:variable name="_records-group" select="key('_records-group-key', fmrs:field[@name=$_groupby-field-name]/fmrs:data[1])"/>

xsl:variable name="_records-group-count" select="count($_records-group)"/>

xsl:for-each select="$_records-group">

xsl:sort select="fmrs:field[@name=$_groupby-field-name]/fmrs:data[1]"/>

xsl:variable name="_record" select="."/>

Based on this, the Month (_groupby-field-name) is being sorted alphabetically. What line can I add to make the sortorder set by my valuelist?

thanks,

[email protected]

  • 4 weeks later...

Difficult question. Well, I don't see an answer in case of a general value list for the moment. But in your case, where you might have a regular order of month(-numbers), you might try that: What, if you add a field month_numeric with values 1,2,3,...12 corresponding to each of your months to the database (e.g. as a calculation field).

Then, in the XSLT file, replace in the variable definition for _groupby-field-name Month by month_numeric, and add the attribute data-type="number" to each <xsl:sort select=...>

Martin

P.S. Good FAQ for general XSLT problems is here: XSLT FAQ - Sorting

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.