Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7133 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

This topic is 7133 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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