Spry Repeat List Unique

Posted on 2009-02-12
Last Modified: 2012-05-07
i have a Spry Repeat List (set up as a drop down list) and i need to show unique values only, does anyone have any idea?
//ds1 is my dataset

//{fldEventCode} is the field that needs to show unique values only  like a 'SELECT DISTINCT' query

  <div spry:region="ds1">

          <select name="select" spry:repeatchildren="ds1">

          <option value="{fldEventCode}">{fldEventCode}</option>



Open in new window

Question by:philosullivan
    LVL 70

    Expert Comment

    by:Jason C. Levine
    Hi philosullivan,

    Where is the data list coming from?

    Author Comment

    it's coming from a recordset exported to xml (the same recordset is currently being displayed in a spry table) , i'm trying to use this 'column' without dupes as a filter.
    LVL 70

    Accepted Solution

    Easier solution is to run the SELECT DISTINCT command at the recordset and then go to XML.  Have two recordsets if necessary...

    Author Closing Comment

    that does seem easiest, i just didn't know if there was a spry function that i wasn't seeing in the doc.
    LVL 70

    Expert Comment

    by:Jason C. Levine
    >> just didn't know if there was a spry function that i wasn't seeing in the doc.

    There is. When creating the XMLDataSet, there's a check in the Wizard for distinct values. The caveat is that the XML dataset can only have the one column in it for it to work.

    So you end up running two XML datasets or two MySQL queries no matter what.

    Syntax if you're interested:

    var dsWhatever = new Spry.Data.XMLDataSet("../path/to/file.xml", "rss/channel/item/column",{distinctOnLoad:true,useCache:false});

    Just out of curiosity, why grade this a B if you agree the solution was good?

    Author Comment

    the grade was in error, if you can tell me were to go to change it to an 'A" i'll be more than happy to do so.
    LVL 70

    Expert Comment

    by:Jason C. Levine
    If it really was in error, then just click "Request Attention" in your first post and ask a Mod to change it.  I was actually looking for feedback since I didn't really answer the initial question until after you closed it and my original post pretty much looks like a B answer.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
    I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now