Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6201631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:35:24+00:00 2026-05-24T04:35:24+00:00

I have a situation where I have a List showing a queue of Upload

  • 0

I have a situation where I have a List showing a queue of Upload Objects:

public class Upload
{

    public var type:String; // Update or Create
    public var title:String;
    public var message:String; 
    ...
    }

So, the list dataprovider would look something like:

var arrayCol:ArrayCollection = new ArrayCollection(
                               {new Upload("Upload", "blah"),
                                new Upload("Create", "blah2")});
list.dataProvider = arrayCol;

I would like to create three different views of the List:

  • One showing All uploads in the queue
  • Another showing only the Upload items with Upload.type == "Update"
  • and another showing only the items with Upload.type == "Create".

Another example of this would be on an email inbox, where we could filter “All, unread, or read”.

I realise I could just create three different lists, one for each view of the list (maybe I’m just being picky) but I was wondering:

Is there is any easy way to conditionally select the items to display from a DataProvider based on a parameter (for example type =="Upload") so I don’t have to juggle three separate ArrayCollections about?

If not, 3 different lists and 3 ArrayCollections it is!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:35:26+00:00Added an answer on May 24, 2026 at 4:35 am

    You want to look at the filter function property on Array Collection. You can assign the filter to a function that will look at a property on upload, and conditionally decide if it should be included in the collection. With a filter function set, and refresh() called on the collection, a subset of objects will appear to be in the ArrayCollection, but the originals are not lost. Simply clearing the filter then calling refresh() on the ArrayCollection will return it to its original collection.

            var arrayCol:ArrayCollection = new ArrayCollection(
                                                {new Upload("Upload", "blah"),
                                                new Upload("Create", "blah2")});
            arrayCol.filterFunction = filterCompleted;
            arrayCol.refresh();
    

    Then your filter function will look something like:

            private function filterCompleted(item:Object):Boolean{
                if(Upload(item).isComplete)
                    return true;
                return false;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation where i want to return List<> from this function public
I have this situation where I want to display a list of Administration objects
I have a situation where the second select list option is generated from the
I have a situation in C# where I have a list of simple types.
Here is my situation: I have one table that contains a list of drugs
i have situation like this: class IData { virtual void get() = 0; virtual
I have situation. I have to create a Sports Club system in JAVA. There
For a game I'm making I have a situation where I have a list
I have a situation where I want to remove duplicates from a collection (list)
For example I have this situation: on server we have list of words: {'word1',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.