Using the Distinct Option

Hey Guys,
I'm calling the following dataset like this:
var dsProducts = new
Spry.Data.XMLDataSet("data/product_list.xml", "/products/product");
The XML looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<products xmlns="
http://www.products.com/products">
<product id="1">
<productModel>dada</productModel>
<productName>Dada 5000</productName>
<productDesc>Cool product</productDesc>
<imgName>dada.jpg</imgName>
<productNum>1234</productNum>
<productPrice>555.00</productPrice>
</product>
There's about 50 products. What I want to do is populate a
dropdown box with the productModel values. However, there's only a
total of 3 different ones, so I'm trying to pull the DISTINCT
values of that node. Right now the dropdown has 50 values in it,
and I can't figure out how to use distinct with it.
Any ideas?
Thanks.

Hello,
The Spry preview that will be available in couple of weeks (I
hope :) ) contains the ability to specify for the distinct a field
or a list of fields to be only considered. Right now the entire row
is checked to be distinct in the dataset and if any difference
exists in any of the fields then the record is added.
I think the easiest method to control the value selected when
a link is clicked is to add on that link the following JS code:
onclick="document.getElementById('theSelectElementID).selectedIndex
= '0'; return true;"
which will select the first option of the
"theSelectElementID" select element.
Cristian MARIN

Similar Messages

  • How to use the distinct key in formula field in SAP Crystal Reports

    I want to use the distinct key in formula field in SAP Crystal reports.
    When i'm using it shows an error.
    Please suggest me....

    Hi,
    Use DistinctCount keyword directly for your calculation instead of count(distinct(....
    Alternatively, if you want to avoid duplicate records, under "File" > "Report Options" make the 'Select Distinct Records' as True.
    Thanks,
    Raghavendra

  • How to use the print option for photos?

    How to use the print option for photos.  I have a wireless printer but how do I set it up?

    http://www.apple.com/support/iphone/assistant/airprint/

  • How to use the chart option in bex analyzer

    Hi Expert
    i want to know how to use the Chart in Bex Analyzer.
    Next week i hve End user Training. my user wanthow to use the chart option in Analyzer.
    plz let me know how to use chart & any Document on that plz reply me.
    Reagards
    siva
    Edited by: patel siva on Sep 16, 2008 4:34 PM

    Check here:
    https://reporting.uky.edu/BWBExContextMenu.pdf
    http://help.sap.com/saphelp_nw70/helpdata/EN/8b/4ffd9b07474279b3bbee75a60db41f/content.htm
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/5b/30d43b0527a17be10000000a114084/frameset.htm
    Thanks..
    Shambhu

  • Text field properties-Using the 'required' option in the text field properties.

    Using the required' option in the text field properties.
    The 'help' manual describes the 'required' function as this: Required Forces the user to fill in the selected form field. If the user attempts to submit the form while a required field is blank, an error message appears and the empty required form field is highlighted.
    My users ARE not submitting the form, they open the pdf, fill it out and print it. HOW can I, make a field "required', I don't want them to skip/leave blank specific fields. However, if I choose the box 'required' in the text field properties, and I begin filling out the form, I can just tab past that field that I've choose as 'required', and I do not get
    prompt/error message or anything, it allows me to save, or print.
    I WANT SOME TYPE OF message (similar to enter a company order form
    off the web, where you can't continue without filling out 'required' fields).
    Is there a step/option I am not doing?

    Then you are going to have to write some JavaScirpt to be executed by the "Will Print" document action to check all the requried fields, either by name or by the 'required' property and handle the issue of the imcomplete fields. You will not be able to stop the print, but you could display and error field so the user knows the form is incomplete and the printed form also conatains this information.

  • I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    You're welcome.
    Going back to your original post:
    5) Tried running Itunes in 'safe mode', running itunes as an administrator..nothing.
    Was that iTunes' safe mode as opposed to Windows' safe mode? iTunes safe mode is invoked by holding down CTRL+SHIFT immediately after clicking the icon to launch iTunes and continuing to hold until this message pops up:
    Click continue, then close iTunes and reopen. With luck iTunes now opens normally every time.
    tt2

  • On a Mac OS X version 10.4.11 and itunes 9.1.1.  Can't update to itunes 10.6Trying to get a previously purchased song.  Can't use the purchased option under quick link - nothing shows up and won't let me purchase an already purchased song.  What can I do?

    On a Mac OS X version 10.4.11 and itunes 9.1.1.  Can't update to itunes 10.6, Mac too old. Trying to get a previously purchased song.  Can't use the purchased option under quick link - nothing shows up and won't let me purchase an already purchased song.  What can I do?

    If possible you need to upgrade OS X. However, what you can upgrade to is dependent on what your Mac hardware and configuration is which you have not provided in your profile.

  • How do I keep the source document open when linking to a target document using the destination option in Adobe X?

    How do I keep the source document open when linking to a target document using the destination option in Adobe X? Have several links to create in the source document and want to keep the source document and target document open at the same time.

    Go to Edit - Preferences - Documents and un-tick "Open cross-document links
    in the same window".

  • How to transfer photo's from LR to Blurb without using the Book option in LR?

    Without using the Book option in LR can one transfer photo's to Blurb?

    There is no way like with Aperture where you can drag your photo from Aperture to Blurb?

  • Order Import failing with error "The specified subinventory is invalid to use, the profile option INV: Allow Expense to Asset Transfer is set to No. Change the profile option to Yes or choose a valid subinventory."

    Hi All,
    I am getting this error while importing an internal sales order.
    “The specified subinventory is invalid to use, the profile option INV: Allow Expense to Asset Transfer is set to No. Change the profile option to Yes or choose a valid subinventory.”
    I have tried to set mentioned profile as ‘Yes’. But still getting same error.
    Also, provided subinventory is present and active in given inventory organization.
    Please share if anybody encountered this before and have a solution.

    Hi 2878342
    Please refer the following metalink note, it should resolve your problem.
    Order Import Interface.Error Message Specified Subinventory Is Invalid To Use (Doc ID 406411.1)

  • Cannot attach multiple photos using the ' Message ' option iOS 5.0.1 in  ' Photos ' app.

    Since i have updated my iPhone 4 to iOS 5.0.1 i cannot attach multiple photos using the ' Message ' option in the  ' Photos ' app.
    i browse my photos and then select ' Message ' on a photo. i am then able to attach the first image to the message.
    When i then select the Camera icon on the created message to add another image ,  either  ' Choose existing ' or ' Take Photo or Video ' ,  it does nothing and takes you back to your existing message.
    I am able to attach multiple images when accessing the iMessage app  it is just from the Photos app it is occuring
    is anyone else having the same issue ?

    You can submit the feedback to Apple here:
    http://www.apple.com/feedback

  • Errors (-50) occured when i was using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in my iTunes application on my computer.

    errors (-50) occured when i was using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in my iTunes application on my computer.
    what is it?

    Quoted from the link I provided you with, in your other post.
    These alerts occur due to timeouts or conflicts trying to write a file during download.
    If you encounter this issue while accessing iTunes Store:
    See iTunes 9: "One Moment Please" or "Error (-50)" message when accessing iTunes Store
    If you encounter this issue while while downloading something from the iTunes Store:
    Delete your iTunes Downloads folder, located in:
    Mac OS X:
  ~/Music/iTunes/iTunes Media/Downloads   Note: "iTunes Media" may appear as "iTunes Music. Also, the tilde (~) refers to your Home directory.
    Windows Vista:
  \Users\username\Music\iTunes\iTunes Media\Downloads\
    Windows 7:
  \Users\username\My Music\iTunes\iTunes Media\Downloads\
    Windows XP:
  \Documents and Settings\username\My Documents\My Music\iTunes\iTunes Media\Downloads\
    After locating your iTunes Downloads folder:
    Quit iTunes.
    Delete the Downloads folder on your computer.
    Open iTunes.
    Choose Store > Check for Available Downloads.
    Enter your account name and password.
    If you encounter this issue while while downloading Digital Copies using Windows:
    Use MSCONFIG (directions for Windows XP and Windows Vista/Windows 7) to disable conflicting software.
    If using MSCONFIG steps resolves the issue, you may want to use the System Configuration Utility to turn on the third-party System Services and Startup Items one at a time (restarting your computer after turning on the item or items) to identify which System Service or Startup Item is causing the conflict.
    You can turn all of them back on by selecting the Normal Startup option under the General tab of the System Configuration Utility window, but please note that this may cause the issue to reoccur.
    If you are able to isolate the issue to a particular third-party software, you may wish to contact them to let them know of the conflict.

  • I switched to Apple Mail in the last two months.  When I attempt to print an email message, I get a blank piece of paper.  When I attempt to use the print options suggested in "Mail Help", the program crashes and has to be reopened.  Any ideas?

    I switched to Apple Mail in the last two months.  When I attempt to print an email message, I get a blank piece of paper.  When I attempt to use the print options suggested in "Mail Help", the program crashes and has to be reopened.  Any ideas?

    Which version of Mail are you using as well as which Snow Leopard version you are using? 

  • Using the paste options randomly misses out text, don't use it and use the 'Paste Special...' option instead (MS Outlook)

    Also there seems to be no obvious way to report Office bugs.  This is leaving little room for improvement.  Not sure if there has been any planning on this front???
    For example, [MS Outlook] using the paste options randomly misses out text, (don't use it and use the 'Paste Special...' option instead).  But how do I communicate this to the Office team without knowing at least one of the team personally (which I
    don't)???

    Hi,
    Do you have this issue when pasting in other programs?
    If you are pasting something into Outlook, some formats and images may get lost, especially when you choose the Paste Options as Keep Text Only.
    Once you have this issue again, please try with "Keep Source Formatting". This may keep the Sour Formatting and you may not get the text lost.
    If you have any feedback when using our products, I suggest you press Ctrl + Alt + 7 or Ctrl + Alt + 8 to submit it. Microsoft will always listen to users' voice and make the products better and easier to use.
    Regards,
    Melon Chen
    TechNet Community Support

  • I used the drawing option in AppleWorks. What is an equivalent program/option for Lion?

    I used the drawing option in AppleWorks. What is an equivalent program/option in Lion? I use it to design quilts.

    Nothing that comes with Lion.
    Just put, "osx drawing program free," in Google and take your pick.
    First one on the list is one called Paintbrush: http://paintbrush.sourceforge.net/
    You could also just search the App Store.

Maybe you are looking for

  • Okay friends seriously- has anyone ever restored their iPod?

    I'm going on almost an hour of my iPod restoring itself to factory settings. Im thinking that something is wrong because the status has said "waiting" for about an hour.

  • Hide the field

    Hi freinds, I have to hide a filed in bid invitation cockpitt in the srm portal the transaction i am using is bbp_bid_inv for that i checked the badi BBP_UI_CONTROL_BADI and found there is an implementation for this so i added the required filter BUS

  • Simple App Distribution

    I've been using Zenwork for many years but just started a company wide design to use Zenworks Server management, primarily T.E.D. System overview: Windows 2003 SP2 – eDir 8.7.3.9 – Zenworks Desktop Management 7.01 HP3 – Zenworks Server Management 7.0

  • Collective availabilty check

    Dear PP experts, I am facing a problem with collective availability check. My FG strategy is 52 and for below BOM components I have assigned 70 for which I want to keep in stock and 74 which I do not want to keep in stock. After creating PIR for my F

  • Can't OSD the Lenovo X240

    Hey guys so I've been very succesfully OSD'ing various computers the past half year. Lenovo T61, T500 T520, I install Windows 7 Enterprise on these machines today I got some Lenovo x240.. so I got the SCCM driver pack from their webiste, Windows 7 (x