Filtering on multiple options

This ought to be elementary, so it's frustrating that it doesn't work. I have a XML dataset of community events that contains an "agegroups" field. I want to filter on agegroups, but sometime several possible values are equally valid, e.g. if I want to display events for Adults, I don't care whether the field contains "Adults", "Seniors", or "All Ages". If any of these show up the row should be retained. However if the field doesn't have one of these values it should be filtered out.
I copied the example in the online documentation (http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS880F1685-DD39-484b-A818-F8903 724E215.html) with a little tweaking:
// Filter out all rows that don't have adult events.
var myFilterFunc = function(dataSet, row, rowNumber)
    if ((row["@agegroups"].search(/Adults/)) || (row["@agegroups"].search(/Seniors/)) || (row["@agegroups"].search(/All/)) != -1)
        return row; // Return the row to keep it in the data set.
    return null; // Return null to remove the row from the data set.
dsEvents.filter(myFilterFunc); // Filter the rows in the data set.
Obviously the problem is that nothing got filtered - all events are displayed. I even retreated to the exact example and just searched for "A" in the initial position. No luck.
So, two questions:
1. Any suggestions on getting this to work?
2. What's with the */ at the end? This is supposed to be a close comment, but there's no beginning and if I remove it no results are displayed at all. Sometimes I think Spry is just wacky for no reason at all.

This might help http://amcomtech.net/labs/ajaxframeworks/spry/filterfunction.cfm

Similar Messages

  • How do I use my control key to highlight multiple options in a PDF?

    How do you select multiple options from a selection field in a PDF form? I've tried control and mouse click as the directions indicate on the form. However, I am a new Mac user and I do not know if the control commands are the same. I viewed the commands and combonation key commands in the list provided on this support site. I could not find one to address this specific function.
    -Mrkmrtynz

    Hi Rick,
    Well, following up on the previous posting, I actually did figure out how to make it work but it seems rather inefficient. I can insert a new paragraph right after the paragraph that has the table anchor but when i cut the table, i also cut the paragraph i just created. So to get around that, I create two paragraphs, so that there will be one paragraph left after i do the cut and that is the paragraph that I paste the table into. Once the table is pasted into the new paragraph, I delete the other paragraph that I created.
    Here's the updated code from the for loop:
    var vTbl = vDoc.GetUniqueObject(Constants.FO_Tbl, vTextItems[i].obj.Unique);                 
    var vAnchorPgf=vDoc.NewSeriesPgf (vTbl.TextLoc.obj)      
    var vAnchorPgf2=vDoc.NewSeriesPgf (vAnchorPgf);        
    var vAnchorTextLoc=new TextLoc (vAnchorPgf2, 0);             
    var vTblTextRange=new TextRange ();        
    vTblTextRange.beg.obj=vTbl.TextLoc.obj;       
    vTblTextRange.beg.offset = vTbl.TextLoc.offset;        
    vTblTextRange.end.obj=vTbl.TextLoc.obj;        
    vTblTextRange.end.offset = Constants.FV_OBJ_END_OFFSET                 
    vDoc.TextSelection=vTblTextRange;        
    vDoc.Cut (0);                
    vTblTextRange.beg.obj=vAnchorTextLoc.obj;        
    vTblTextRange.beg.offset = 0;              
    vTblTextRange.end.obj=vAnchorTextLoc.obj;       
    vTblTextRange.end.offset =0;                 
    vDoc.TextSelection=vTblTextRange;       
    vDoc.Paste (0);                   
    vAnchorPgf2.Delete();        

  • Select multiple options in safari or firefox

    Hello to all,
    I am trying to select multiple options in web form on safari or firefox. I am trying with ctrl and mouse but is not working. This fields are not in order so I can not use shift it must be Manuel selection.
    Thank you in advance for fast help.
    Ivan

    Try command key instead of control key.
    OS X Mavericks/OSX Yosemite
    http://support.apple.com/kb/PH13826
    Best.

  • Looking for a better way to determine string variable from multiple options

    Hi,
    I trying to figure out a better way to determine a string variable from multiple options.
    Say i have five pictures each with a different filename: img1 - img5...these file names could be named anything really but for this example i will keep them as img1, img2, img3, img4 and img5.
    I want to display a messagebox with the string depending on what a certain variable is.
    So for example, we have the number X, if X = 1 then i want the messagebox to show "img1" as the message
    Essentially the way I have been doing it so far is:
    Private Sub WhichImage()
    Dim ImageName As String = ""
    Dim i as integer
    If i = 0 Then
    ImageName = "img1"
    End If
    If i = 1 Then
    ImageName = "img2"
    End If
    If i = 2 Then
    ImageName = "img3"
    End If
    If i = 3 Then
    ImageName = "img4"
    End If
    If i = 4 Then
    ImageName = "img5"
    End If
    MessageBox.show(imagename, "Name of image", MsgBox.Style.OkOnly, MsgBoxResult.Ok)
    end
    Up until now, this has been fine, but what if I have 50 images, do I have to do this for all 50 images? or is there an easier way like putting the image names into a text file and have it read from the file depending on what the variable i equals? If so,
    how do I go about this? Does each image name go on a separate line? can it just be separated by a comma instead? or is there a better way?
    Please note that i know that i have declared "i" above in my code and not intialised it with anything, in reality "i" comes from somewhere else in the program so please ignore that part, it is not what I am concerned with.
    Thanks
    Mersec

    Does each image name go on a separate line? can it just be separated by a comma instead? or is there a better way?
    Arrays are useful for this.
    Dim imagenames() As String = {"img1", "img2", "img3", "img4", "img5"}
    Dim imagename As String = imagenames(i)
    MessageBox.Show(imagename, "Name of image")
    Any sort of collection will do instead of an array, and may be simpler to manage. There are many other options - the most suitable one probably depends on where the names originally come from.  For instance, if you are getting them from a folder
    using the FileSystem.GetFiles method, then they are already in a collection.
    If the files names never change then you may as well include them in the program code, using something like the code above.  If they can change, then you could use a text file, but that means you need a file update routine.  If that is required
    then the way you store the names will dictate how you access them.

  • Can a click box be used if multiple options to a questions?

    I was trying to have the student need to click on multiple options for a question.
    The situation called for the student to have to click on four different items that were correct out of a group of six items.  I put success captions on the four correct and failure messages on the 2 that were incorrect.
    Following are my settings for each of the click boxes:
    Action:       On success  - continue      Attempts:    infinite
    Options:  Success or Failure
    Pause for success/failure, Show hand over cursor, pause until user clicks
    The screen fades out before the user can read and select all their choices  (I have the timing for the screen set at 10 sec)
    I have an image button on the page labeled Continue that the user needs to click on before continuing.  It is set at:   Action: on success, continue, infinite attempts
    Is this the right standard object to use for this purpose, and if it is, what settings do I need to make it work?
    Thanks for the help

    You need to use Advanced Actions to achieve your desired result.
    The default behaviour of Captivate interactive objects is to Continue play as soon as you click them.  But there's a trick you can use to prevent this by having the On Success or On Failure action execute an Advanced Action instead that assigns the value of the variable rdcmndGotoFrame with the value of rdInfoCurrentFrame.

  • What is meant by single entry-multiple options in the selection screen

    hi,
      please let me know what is the meant by 'single entry-multiple options' in a selection screen.
    thanks in advance

    Hi Surya,
    Nomally we use to declare Selct options like
    <b>select-options : s_var for mara-matnr.</b>
    here you can enter range of values for material number like 000 to 9999999999.
    but if you want single entry multiple option you need to give no-intervals options when the select option will behave like parameter .. when you cannot give range of values but you can give multiple values for a single field.
    for single entry-multiple options  write the select option like this
    and see the diffrence.
    <b>select-options : s_var for mara-matnr NO INTERVALS.</b>
    here cannot enter low and high range for matnr but you can enter mulitple values for select option..you can enter only low range values..
    Please reward if usefull..
    Thanks,
    Gokul

  • Essbase cannot union filters from multiple groups

    Hi All,
    I got a problem to provisioning on Shared Service.
    In some case, I need to grant multiple filters to a Essbase users, say user01.
    However, each user can associated one Essbase filter only.
    For better management, I create multiple groups with different filters and assign the user, user01, into the groups.
    For first two groups are working normally. However, Essbase cannot "union" all filters from multiple groups after the users join the third groups.
    However, I try to combine the three filter into a filter with three rows. It is working!!!
    It is because there are large number of users in external LDAP. It is unmanageable when combining multiple filters into a filters. Is there any way to solve this problem? or is there any better approach to do the security ?
    Thanks in advance!!!
    Regards,
    TKC

    Thanks for your reply.
    I have following structure in Essbase. I try to make it simple to understand.
    Dept (dimension)
    |_C00
    |_CTTL
    |_C01
    |_C02
    Project (dimension)
    |_GEN
    |_P01
    |_P02
    |_P03
    |_PI
    |_A
    |_P01 (shared member)
    |_B
    |_P02 (shared member)
    |_P03 (shared member)
    Group A with Filter F01
    Read - CTTL, IDESCENDENT(A)
    Group B with Filter F02
    Read - C01, P01, P02
    User joins A and B group.
    The end result of user is that
    he can access CTTL of P01 only
    he can access C01 of P01 and P02 only
    he cannot access C02 of any Project dimension
    he cannot access CTTL of P03
    However, I found that when I change to metaread. The result is going wrong.
    he can access C01 of P01, P02 and P03 only.
    It is because I need to block user to view members which he cannot access.
    I need "metaread" function.
    So somebody tell me how to achieve this? Thanks in advance.
    Edited by: user070322 on Jan 4, 2009 8:37 PM
    Edited by: user070322 on Jan 5, 2009 6:04 PM

  • Jms message filtering with multiple fields

    Hi
    Can anybody please tell me how to do message filtering with multiple fields. i using jdeveloper11.1.1.4.0 , soa11g suite and weblogic 10.3.
    previously i used JMSType property for one field filtering.
    and is it possible to invoke jms adapter with our own properties (adding property to jms).
    thanks,
    Sourbh

    thanks atheek
    i worked with the same and it helped me a lot i can share one more link that will help.
    http://forums.oracle.com/forums/thread.jspa?messageID=9650255&#9650255
    Regards,
    Sourbh.

  • Question about multiple options selected in dropdown menu

    I have limited space in a PDF fillable form (and of course am new to this).  the Listbox option is nice in that the user can select multiple options.  However, the list option also consumes a lot of physical space.  If I have limited space (where a dropdown menu would be perfect), is it possible to set the Dropdown menu option to accept multiple selections (ie, more than one option selected by the user)?
    Also, I do not have enough room for individual check boxes.
    thanks

    Another option is a custom dialog. In a form I designed that gets used a lot, a custom dialog presents the user with 60 check boxes (20 rows, 3 columns). Once the user makes selections, the item IDs are stored in a text field as a comma separated list (e.g., "1,6,21,59"). Unfortunately, it's not as easy to set up as simply placing a field since it does involve a decent amount of programming, but it does work well. Do you have any JavaScript programming experience?

  • Remove filters from multiple clips

    Is there any way of deleting effects filters from multiple clips, a reverse of the paste effects or paste attributes functions?

    Brilliant - Sounds so logical when you know how.
    You have saved me hours.
    Thanks

  • Single hot corner, multiple options?

    Hi guys,
    I recently updated my iMac from app store's downloadable Mountain Lion (10.8.2).
    And I bought a Mac Pocket Book for learning about this new OS.
    Here's the thing confused me a lot.
    The author said these:
    Use the drop-down menus to set options for any corner you want. After that, when you move your mouse to that corner, your Mac fires up the screensaver (or does what you told it to—put the display to sleep, launch Mission Control, or whatever). The only downside of setting hot corners is that Apple gives you eight options for each corner, so unless you want to use a modifier key with the corner, you don’t have enough corners to use all the options.
    By using modifier keys (you can choose from Shift, ⌘, Option, and Control), you can get a single corner to do many different things. To add a modifier key to a hot corner, hold down the modifier key while you select what you want the hot corner to do from the Active Screen Corners window’s menus. Using modifiers with hot corners not only gives you extra flexibility, but it also prevents you from accidentally invoking the hot corner action when you’re mousing around.
    But I cannot set a single corner with multiple options! Could you guys can do that???

    I'm with you. I can get 10.8.2 to require a specific modifier key in a corner, but I cannot get multiple modifier keys to do different things in the same corner.
    However, the author is right that on the last point. It can help prevent unintended activation.

  • With IE I have multiple formats such as MP4 that I can use to D/L you tube music videos but with Mozilla it has me load Adobe Flash which I already had and then I can only D/L utiliaing the FLV format - I want multiple options as I have in IE - help?

    With IE I have multiple formats such as MP4 that I can use to D/L you tube music videos but with Mozilla it has me load Adobe Flash which I already had and then I can only D/L utiliaing the FLV format - I want multiple options as I have in IE - help?

    And what is the point of all this? CS3 is now 7 years old and Office 2003 just the same. Yes, sometimes software has bugs and compatibility issues. Beyond there is nothing here to discuss on either end, given the circumstances...
    Mylenium

  • Safari Accessibility in Forms how to Select Multiple options

    Hi, I'm using Safari 3.0.4 for Windows on XP Pro,
    (for accessibility purposes - without using the mouse) what is the keyboard shortcut (if any?) to select multiple options in a select list or combo box?
    This site, for example: http://jeffhowden.com/code/css/forms/ has a select near the middle of the page labeled "What is your current availability?" To select the 1st and 3rd option, but not the 2nd, in most other browsers, I can use Ctrl-Spacebar, or Shift-F8 (IE).
    Is there a way to do this in Safari?
    What about a way to edit the keyboard shortcuts so that "Ctrl-Spacebar" does a check/uncheck item instead of pagedown?
    tia,
    Keith Kubicek

    yes most other browsers can select multiple options
    in IE, press Shift+F8, then use the arrow keys and select with Spacebar.
    in Firefox, hold down Ctrl, then use the arrow keys and spacebar to move and select,
    Opera 9.5b has a keyboard shortcut file you can edit - change the spacebar to check/uncheck item,
    Netscape 7 works like Firefox, NS4 works like IE.

  • Titles: more than 2 lines per screen in 'Centred Multiple' option?

    Hi,
    Just a quickie. I want to create an opening Title sequence to my movie but the 'centred multiple' option only allows 2 lines per page/screen, and none of the other options fits the bill.
    Is there a (preferably freeware) plug-in that allows me to do this?
    PowerBook G4 17 1.67 gHz 512Mb/100Gb   Mac OS X (10.4.3)  

    Hello Arcadian:
    Our own Lennart Thelander has a great "freeware" Download for Centered Titles. I don't know for sure that it will do all that you want, but it s a great plug in.
    LT iMovie Titles.sit
    http://www.berga.nu/Lennart_T/imovie/index.html
    Otherwise, you could using Scrolling Block...Make your titles and when the scroll gets centered in the page, pause it and go to Edit / Create Still Frame and then drag that down for your centered title. You can even change the length by going to "show info".
    Sue

  • Selective IP filtering for multiple servers in a domain?

    Is it possible to have IP filtering on for certain servers in a
    domain, and not for others?
    This is the situation:
    I am deploying two servers in mydomain, so let's call it serverA
    and serverB. I want serverA to accept all connections while
    serverB accepts connections only from certain IPs. I know you
    can do IP filtering using SimpleConnectionFilter in the
    "Connection Filter" option in Security->General tab of the Admin
    console, but this turns on IP filtering for BOTH serverA and
    serverB! How do I turn it on for one, and not the other? Any
    help would be greatly appreciated. Thank you.
    Leon

    Hi,
    Yes you can have muliple servers in a domain. You can create as many managed
    servers as your hardware can handle. When you added the server, did you use the
    startManagedWebLogic.sh (or .cmd) script to start the server. Once you do that,
    you should see the server as running.
    Hope this helps,
    pat
    "MS" <[email protected]> wrote:
    >
    Hello All,
    Is it possible to have multiple servers in a domain?
    When I add a new server, the State is reported in the weblogic console
    as "UNKNOWN".
    What does this mean?
    rgds
    MS

Maybe you are looking for

  • Pavilion elite m9350f crashes

    May computer has started crashing with either re-booting or BSOD's. I am running the system with Vist 64 bit, all original hardware (I have not changed out anything) : AMD Phenom 9850 Quad-core processor 2.50 GHz 6GB RAM  Nvidia GeForce 9800GT I have

  • Iphoto pictures disapeared after trying to sync my droid razr motocast to macbook.

    Help! I'm trying to get my pictures to reappear on iphoto but nothing is working.  Trying to sync my droid razr to my macbook has changed the format of the pictures and they no longer appear in iphoto. They appear as outlined squares with no photo. 

  • Deleted my itunes cache

    my wife was trying to free up space on here computer and it looks like see deleted her itunes cache file? she said it was the ipod cache? i have looked for about 5-10 bur could not find any of her music or apps or anything/ she also updated itunes to

  • Is there a way to install the AE software if my harddrive is broken?

    I have a laptop and a desktop and would like them to both work on the wireless network, but the harddrive on my desktop is broken... is there any way to obtain a digital copy of the software?

  • Auto-increase of numeric value in autocomplete

    What I'm wondering is can autocomplete use the value entered into the previous field and increase that value by one numeric digit for the new autocomplete?  For example, if the first entry is manually entered as "W1234" can you have autocomplete ente