How do you add multiple filters with checkboxes to an arrayCollection?

hey guys... so i have three checkboxes and when i click one of them i need to filter out my array collection according to which ones are clicked
I have the filter function working partially, but when i select multiple checkboxes i dont see anything in the arraycollection.
the code i have is
<s:VGroup x="-100" y="400">
     <mx:HRule />
     <s:CheckBox label="Approved Stories" color="#333333" selected="@{_approved}" change="filterChanged()" />
     <s:CheckBox label="Rejected Stories" color="#0184C7" selected="@{_rejected}" change="filterChanged()" />
     <s:CheckBox label="Pending Stories" color="#50C8E8" selected="@{_pending}" change="filterChanged()" />
</s:VGroup>
<s:DataGroup width="100%" height="100%" clipAndEnableScrolling="true" dataProvider="{filteredStoryDataArr}" click="itemClicked();">
</s:DataGroup>
private function returnesAllStories(event:ResultEvent):void{
     for each(var item:Object in event.result){
          storyDataArr.addItem(item);
     filteredStoryDataArr = new ArrayCollection(storyDataArr.source);
     filteredStoryDataArr.filterFunction = storyFilter;
public function storyFilter(item:Object):Boolean
     return    (!_approved || ((item.ApprovedBy > 0) && (item.DateApproved != ""))) &&
            (!_pending || ((item.ApprovedBy == -1) && (item.DateApproved == ""))) &&
            (!_rejected || ((item.ApprovedBy == 0) || (isNaN(item.ApprovedBy))));
public function filterChanged():void{
     filteredStoryDataArr.refresh();
right now if i click approved i see all the approved stories, or if i check pending, i see all the pending stories.... but if i check pending and rejected, i dont see anythign in the list... any ideas how to fix that???

there is no built-in way to do this. the only way i know is by using Mail Scripts
http://homepage.mac.com/aamann/Mail_Scripts.html
it has a script "Add addresses" that does just what you want.

Similar Messages

  • How do you add multiple filters to an arrayCollection?

    hey guys... so i have three checkboxes and when i click one of them i need to filter out my array collection according to which ones are clicked
    I have the filter function working partially, but when i select multiple checkboxes i dont see anything in the arraycollection.
    the code i have is
    <s:VGroup x="-100" y="400">
         <mx:HRule />
         <s:CheckBox label="Approved Stories" color="#333333" selected="@{_approved}" change="filterChanged()" />
         <s:CheckBox label="Rejected Stories" color="#0184C7" selected="@{_rejected}" change="filterChanged()" />
         <s:CheckBox label="Pending Stories" color="#50C8E8" selected="@{_pending}" change="filterChanged()" />
    </s:VGroup>
    <s:DataGroup width="100%" height="100%" clipAndEnableScrolling="true" dataProvider="{filteredStoryDataArr}" click="itemClicked();">
    </s:DataGroup>
    private function returnesAllStories(event:ResultEvent):void{
         for each(var item:Object in event.result){
              storyDataArr.addItem(item);
         filteredStoryDataArr = new ArrayCollection(storyDataArr.source);
         filteredStoryDataArr.filterFunction = storyFilter;
    public function storyFilter(item:Object):Boolean
         return    (!_approved || ((item.ApprovedBy > 0) && (item.DateApproved != ""))) &&
                (!_pending || ((item.ApprovedBy == -1) && (item.DateApproved == ""))) &&
                (!_rejected || ((item.ApprovedBy == 0) || (isNaN(item.ApprovedBy))));
    public function filterChanged():void{
         filteredStoryDataArr.refresh();
    right now if i click approved i see all the approved stories, or if i check pending, i see all the pending stories.... but if i check pending and rejected, i dont see anythign in the list... any ideas how to fix that???

    Jer&Renee,
    welcome to Apple Discussions.
    It depends where you want them in your presentation.
    Open the Media inspector and choose a playlist. In the list of entries, mark those you want to add to Keynote (use command-click to mark multiple titles not in one block).
    Then drag the marked titles either on a slide or on the small Audio field (looks like a frame) in Document inspector. When you then hover the cursor at the Audio "frame", you'll see the quick info "Multiple Files". You cannot change the order or remove one of the files, but only all of them.

  • How do you add multiple users to an itunes account

    how do you add multiple users to an itunes account

    First :
    Using an iPhone without a wireless service plan
    Then restore the iPod to factory settings/new iPod on the computer your kids will use:
    iTunes: Restoring iOS software
    If you are using the same computer
    How to use multiple iPods, iPads, or iPhones with one computer

  • How do you add multiple iTunes to Keynote

    How do you add multiple songs from the iTunes to your Keynote presentation?

    Jer&Renee,
    welcome to Apple Discussions.
    It depends where you want them in your presentation.
    Open the Media inspector and choose a playlist. In the list of entries, mark those you want to add to Keynote (use command-click to mark multiple titles not in one block).
    Then drag the marked titles either on a slide or on the small Audio field (looks like a frame) in Document inspector. When you then hover the cursor at the Audio "frame", you'll see the quick info "Multiple Files". You cannot change the order or remove one of the files, but only all of them.

  • How do you add safari favourites with the new iOS?

    How do you add safari favourites with the new iOS?

    Do you mean you want to sync your desktop Safari bookmarks to iOS? This is done in iTunes when you sync the iOS device. There is a box to check to make this happen.

  • How do you add multiple effects to the same clip

    How do you had multiple effects to the same clip. I have tried for hours
    I would like to add sepia and aged movie to the same clip. I heard it can be done, but have not figured out how to do it.
    anyone please.

    Normally you can apply only one video effect at a time. But for Sepia, black and white, and others that can be done through the video Adjustments tab, you are in luck.
    Aged Movie should already have a bit of a sepia tone.
    If you want more of a sepia tone or you want to fine tune the sepia effect you can do it with the Clip Inspector/Video Adjustments tab.
    Note: Thanks to Jeff Carlson of MacWorld for this tip.
    If you're looking for a washed-out sepia appearance, first open iMovie's preferences and turn on the Show Advanced Tools option, which adds more controls to the Video Adjustments HUD and other areas of the program. Select the clip you want to alter and press the V key. Set Saturation to 0 percent, and then drag the Red Gain slider to 143 percent, the Green Gain slider to 90 percent, and the Blue Gain slider to 53 percent (feel free to tweak these settings to customize the results). Click on Done when you're finished. Note that the clip thumbnail still appears in color, as the video was shot, but the preview reflects your changes.--JC
    If you need to apply the same settings to all clips, first select the clip you have adjusted. Then Edit/Copy. Then Edit/Select All. Then Edit/Paste Adjustments.

  • How Do You Add Multiple CSS Rules to Text?

    Hi everyone, I have these css rules in my css styles window they are all assigned to some text in a cell on my page.
    .Def14grey4 <body>
    .def14grey4 a:link <a>
    .def14grey4 a:visited <a>
    .def14grey4 a:hover <a>
    .def14grey4 a:active <a>
    .def14grey4 a:focus <a>
    How do you add (all of) these styles to the text in the first place, I know how to add the first one (.Def14grey4), you select the text in the cell and choose the rule from the drop-down menu in the css panel, but how do you add the other ones to some text as well, so that it can have the same link properties.
    Basically I have some more text elsewhere on the page and want to assign these rules to that as well.
    thanks Gareth

    You would want to change your order as shown here -
    .Def14grey4 <body>
    .def14grey4 a:link <a>
    .def14grey4 a:visited <a>
    .def14grey4 a:hover, .def14grey4 a:focus <a>
    .def14grey4 a:active <a>
    That way, the hover and the focus states are equivalent.
    How do you add (all of) these styles to the text in the first place, I know how to add the first one
    You don't really.  The 4 bottom selectors say -
    "find an element with a class of 'def14grey4', and style any link inside that element this way"
    So, <span class="def14grey4"><a href="whatever.html">Whatever</a></span> would get the pseudo-class styles, as would any of the following -
    <span class="def14grey4"><a href="whatever.html">Whatever</a></span>
    <td class="def14grey4"><a href="whatever.html">Whatever</a></td>
    <p class="def14grey4"><a href="whatever.html">Whatever</a></p>
    <body class="def14grey4"><a href="whatever.html">Whatever</a></body>
    <div class="def14grey4"><a href="whatever.html">Whatever</a></div>
    <strong class="def14grey4"><a href="whatever.html">Whatever</a></strong>
    and so on.  These examples assume that there isn't some other more specific rule that would apply to the same links.  You need to study up on the CSS cascade and specificity....

  • How do you add multiple birthdays to one contact

    I keep searching but it seems all the tips are old form previous versions or I am missing something.  I am currently using Mac OS X 10.7.3
    I am trying to add multiple birthdays in my Address Book under one person, thier family members and I want it to sync with iCal.  I also did not see the Anniversary option in Address Book
    Please help,
    Thank you,

    This has two parts. The second one, having the extra dates sync with iCal/Calendar, I don't (yet) know how.
    The first one, though, isn't so hard. Go to Addressbook/Contacts preferences. Under templates, click on "Add field" and select "dates."
    Now you can customize the template to default with "Anniversary" or whatever other nametag you'd like to give the date field or fields.
    I'd really like to hear how, if it's at all possible, even, to have those sync in iCal/Calendar.

  • How do you add multiple addresses from Mail to Address Book at once?

    So let's say I receive an email to myself and 50 other recipients and I want to add those other recipients to my address book. Do I seriously have to go through and select "Add to Address Book" on each of the fifty contacts?! Tried doing a shift click which will highlight all contacts, but then when you right-click to get the "add to address book option" it only displays one single contact at the top of the menu. I know there is a way to add select and add multiple contacts to address book at once because I figured out how to do it once a long time ago and I still have the 67 card group to prove it. I just can't remember how I did it!!! Didn't think it'd be such a hard feature to re-discover. Would love some help on this! Thanks.
    David

    there is no built-in way to do this. the only way i know is by using Mail Scripts
    http://homepage.mac.com/aamann/Mail_Scripts.html
    it has a script "Add addresses" that does just what you want.

  • How do you setup multiple users with multiple devices on itunes?

    I'm trying to find the easiest solution to our family music situation.  4 users, 4 devices (ipods, ipad, imac, pc laptops), and 4 different musical song interests.  I'm sure there are millions of households that have the same exact situation.  I want to be able to pull up only my musical library, not my kid's music, and then easily synch it to my ipod.  Everyone in the family wants to do this same thing.  I have spent alot of time trying to search the forums/internet and there does not seem to be one "most popular" solution.  I did setup iCloud for each family member using a different Apple ID than my main Apple ID, and I'm happy that ALL the music shows up on my ipad.  But between iCloud, MobileMe, Home Sharing it all gets very confusing.  Some say to setup multiple computer login accounts, and others say to setup 1 playlist for each family member and synch from that playlist.
    I would think 1 itunes account allows you to easily share a purchased song with 4 users, instead of buying songs twice.
    So here are a few of my questions-
    1-Is it best to have only 1 itunes account and then synch all devices off of 1 main computer? 
    2-Or since we each have iCloud accounts, will they be able to synch their ipods from their own pc laptop?
    3-And when they synch, what is the easiest way to exclude other users music in itunes? (other than unchecking hundreds of artists)
    4-Or setup 4 separate computer login accounts on the imac and then keep 1 itunes account?  If so, how does this work when they open itunes?
    Again, I'm hoping for a straightforward simple solution.  I don't want to move & create libraries, download 3rd party software, etc. etc.  Please reply if you found something that works for your family.  Thanks in advance.

    Richmaster wrote:
    turingtest, I do have a couple questions. 
    Number one, does everyone in your family only sych their ipods from only 1 computer?  If everyone only uses itunes from 1 computer I can see how that will work.  But what if kids want to use itunes for windows?  Will "Home Sharing" allow all their music purchased on the MAC, to be also displayed on their itunes for windows laptop?  I noticed you have PCs and also an ipad.  How do you manage your family's music on these devices?
    Also, how did you first get everyone's music library into their own library?  Drag & drop?  Is the "grouping field" you mentioned under "view", then "view options"?  What does this do? 
    Thanks.
    Sorry I missed your post earlier. Normally I follow up on any replies. This one must have fallen off the page on a busy day.
    As my kids have left home I have created for them a complete clone of the familiy library, then deleted the tracks from it they don't want. Over time their libraries will divirge, but if needs be they can still update their devices using the library at home. Handy when eldest's kit was stolen.
    Grouping is just another property, useful because it isn't generally overwritten by other software but is stored in the tags, so preserved when you copy files from one place to another. You can make the column visible and edit for multiple tracks in Get Info. Some software calls the same field "mood" or "sub-genre". iTunes has a specialist purpose for it generally used with classical music, but it doesn't seem to work very well for that and I don't use it that way.
    tt2

  • How do you use multiple displays with a MacBook Pro and iMac

    I have an iMac and a MacbookPro laptop both upgraded to OS X 10.9 (Mavericks).  I'd like to use multiple displays with them.  Can I do this without an Apple TV?  They are both on the same network.  If I can, can someone please give some instructions on how this can be done?
    Thanks!

    Both computers have ports for external monitors. Check your user manuals. Only one display can be added to the MBP, but newer iMacs have dual Thunderbolt ports.
    Do your own Google research to learn what to do, but reading your manuals should be all you really need. It' not rocket science yet.

  • How Do You Add Multiple Pieces of Art to Albums?

    I know that you can add multiple pieces of art to individual songs. However, when I click "Info" on an album (or when I select multiple songs), I can only add one piece of art. I want to add art from the front and back of a CD, but I do not want to have to do this by going song by song. Any ideas on how to do this quickly? Thanks.

    there is no built-in way to do this. the only way i know is by using Mail Scripts
    http://homepage.mac.com/aamann/Mail_Scripts.html
    it has a script "Add addresses" that does just what you want.

  • How do you add multiple cells to the LARGE function?

    I want to add several cells which are contained on different sheets and tables to the same LARGE function and select the first ranking cell value.
    How do I add these cells as a single argument for this function?

    "...and select the first ranking cell value."
    Hi eobet,
    If your actual goal is as stated, you could use MAX, which will accept a list, a range, or a list of ranges as arguments.
    LARGE accepts only a single argument to establish the set of values, plus a single argument to establish the rank of the desired value. That means you need to collect all of the vlues into a sngle contiguous group/range, then specify that range as the set. The avantage, ofcourse, is that with LARGE, you can specify that you want the 'third largest' value in the set.
    Here's an example.
    The data set is column B on tables Data 1 and Data 2.
    The set is collected into a single contiguous range on the table Aux (which may be hidden, or placed on a separate sheet).
    LARGE collects the nth value from the collected set in Aux, using this formula in the table Summary:
    A2, and filled down: =LARGE(Aux :: A:B,ROW()-1)
    MAX returns the largest value from the original data set on Data 1 and Data 2, using this formula on the table Summary-1:
    A2: =MAX(Data 1 :: B,Data 2 :: B)
    Regards,
    Barry

  • How do you add a word with ampersand to a dictionary in InDesign?

    I added "M&A" to the User Dictionary in InDesign, but it did not seem to recognize this word. Instead, it highlighted the character "M". I suspect this must be to do with the ampersand.  How do I add a word like this so that spell check ignores them?

    I would suggest instead that you mark it with "[No Language]" - that should prevent spellcheck just as well, without needing to fiddle with custom dictionaries. (Which I honestly don't know how to do - we do all of our linguistic QA outside of InDesign, so I've never used a custom dictionary, otherwise I'd tell you how.)

  • How do you add multiple facebook accounts to iPhoto

    I'm trying to add more then one account and I don't see how you can.

    Is this to iPhoto on your Mac?  If so maybe this topic will help :how do you sync more than one facebook account to iphoto?, how do you sync more than one facebook account to iphoto?
    OT

Maybe you are looking for

  • ITunes cannot run because it found a problem with your audio configuration

    I started receiving this message today when I tried to synch my iPod. I updated the iTunes software, and still get this message. Defragged, optimized, killed malware, rebooted, and still get this error message. I also went through the steps detailed

  • Widowed Fotter

    I have this master detail report with summary of details. When I let Report to make default layout it creates 3 group frames. First one is for header labels of columns (M_G_ORD_ITEM_HDR) Second one is repeating frame for Items (R_G_ORD_ITEM) And thir

  • /Contents entry in digital signatures

    Hi All, I have problem in making /Contents entry while trying to sign a PDF document.  Infact there is problem in Calculating ByteRange digest and then encrypting it. I have seen cryptographic message syntax v1.5. So I am using Signed-Data content ty

  • Lines Running Together When Editing Form PDFs

    I created a form/fillable PDF in Acrobat XI Pro.  I want to use it on an iPad app called PDF Expert, where I can fill in the fields and save it.  When I do so and have the form sync back to my MacBook and open it, the lines of text in a fillable text

  • Is it possible to reboot a Macbook?

    My trackpad is not responding to clicking on it.  It will highlight an item on the desktop but when I press the track pad it doesn't nothing.  Our old Mac laptop had a battery that you could remove, thus you were able to "reset" it when it acted up.