Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering records

Status
Not open for further replies.

scotth4v

Programmer
Apr 17, 2001
103
US
Hi gang,

More bugtracker questions :)

I have a query that returns a list of names. If the people meet the search criterion on more than one occasion, their name will be on the list multiple times. Is there a way in the XSL to filter it so that it only returns their name once.

One thought was to dynamically loop through the list and set an XSL variable for each person (<xsl:variable name=&quot;johndoe_written&quot;>false</xsl:variable>), then use a choose statement and look to see if it's false, if so, diplay the naeme and set it variable to &quot;true&quot;, otherwise don't write it. That seems doable, but really intensive. Is there a better way?

Thanks a bunch!

-Scott
 
Hello,
<xsl:key> will do the task to show only distinct values.
See thread426-101326.
Post again your code if this is not suitable to your needs.
D.
 
Awesome, I think that would apply! I'll give it a whirl!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top