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.

Featured Replies

I have recently converted my CDML solution to XSLT and am going through and fixing it up. In my CDML solution I had a Javascript to produce a Summary of a found set of records. It is a simple JS that writes a the heading (Summary Field) and data if it is different to the previous record, otherwise just writes the record data. eg

Type 1

object 1

object 2

object 3

Type 2

object 4

object 5

object 6

I have redone the script for XSLT, but for some reason when i add the 'esle' part to my script i get nothing - that is the script appears to evaluate (if I view page source), but nothing is written to screen.

It works if I only have the 'If' statement (I obviously get heading and record data for all records) but not the 'else' statement. I have attached the script.. confused.gif

Please attach the code, there's no attachment.

There are missing curly brackets after the else clause, and a missing ; after the sCat = ... line.

BTW: Why do you do that in JavaScript, and not everything server-side in XSLT? Would be much more elegant and faster, and you don't have to rely on the user if he has turned on JavaScript in his browser.

  • Author

The reason I am using Javascript is because I was advised to use it with the CDML solution. I will look into the XSLT code - thanks

  • Author

Ok, so I got no idea how to tackle this - I can understand the 'when' and 'otherwise' tags, but how do I compare the value of a field for each record in my list with the value from the previous record. Do I need to define a varibale? how do I do this.

thanks

halbj

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.