Display a subset of data?

I have a data grid populated by an XMLList from an XML file.
Currently, it displays data from the entire file.
However, there is a node for each item in the list indicating
a category, e.g. "Fruits", Vegetables"
I want to have a toggle button bar with buttons "Fruits",
"Vegetables" that when clicked update the datagrid display to only
show records matching the term.
How is this done? The book I bought (Friends of Ed) only
showed the solution usinf ColdFusion, but I need to do it all in
Flex. Thanks.

I am not an expert but I have a set of radio buttons that
need to filter data in a grid and I use a filter function like
this;
----Where you load the datat associate a filter like
this------
acVendorDetail.filterFunction=grdVendorDetailFilter;
------ Here is the filter ---------
public function grdVendorDetailFilter(item:Object):Boolean
var result:Boolean=false;
switch (rbtnStatus.selectedValue.toString().toUpperCase())
case "ALL":
result=true;
break;
case "CLEARED":
if (item.CLEAR_DATE != null) result = true;
break;
case "UNCLEARED":
if (item.CLEAR_DATE == null) result = true;
break;
return result;
---- In the clickevent of the radio button do this ------
acVendorDetail.refresh();
That is all there is to it...
Paul

Similar Messages

  • Displaying a subset of records is limiting the information I can show

    Hello All,
    I'm developing my photo gallery's TOC page and when I began, I had lots of data I wanted to display and through the use of lookup tables and the proper logic in my SELECT query, I could show a vertical list of galleries that matched a specific category. With each was listed two sample thumbnails, title, description, model, photographer and make-up artist names. I even was able to set the page title and header to display the proper information.
    An additoinal SELECT query counted the number of galleries in the main table that were relevant to the present query string value.
    Another SELECT query counted the number of photos in each different gallery photoset and displayed that information in EACH gallery's title.
    The description is in reverse to the flow of the code, keep in mind. Here is the code (the $spec variable is that of the query string.):
    //get the total number of photos in a gallery photoset
    $conn = dbConnect('query');
    $getTotal = "SELECT COUNT(*)
                FROM photos, galleries
                WHERE galleries.g_spec = '$spec%'
                AND galleries.g_id = photos.g_id ";
    $total = $conn->query($getTotal);
    $row = $total->fetch_row();
    $totalPix = $row[0];
    // get the number of galleries
    $conn = dbConnect('query');
    $getGtotal = "SELECT COUNT(*)
                FROM galleries
                WHERE galleries.g_spec = '$spec%' ";
    $g_total = $conn->query($getGtotal);
    $row = $g_total->fetch_row();
    $galTotal = $row[0];
    //get gallery thumbnails, name, description, subject, category, model, photographer, mua
    $conn = dbConnect('query');
    $sql = "SELECT g_thumb1, g_thumb2, g_name, g_desc, subject_id, category_id, model_name, photographer_name, mua_name
            FROM galleries, gallery_spec, model_names, photographer_names, mua_names
            WHERE galleries.g_spec = '$spec%'
            AND gallery_spec.g_spec = galleries.g_spec
            AND model_names.model_id = galleries.g_model
            AND photographer_names.photographer_id = galleries.g_photographer
            AND mua_names.mua_id = galleries.g_mua
            ORDER BY g_id DESC ";
    $result = $conn->query($sql) or die(mysqli_error());
    $galSpec = $result->fetch_assoc();
    *** end of code.
    Anyhow, this worked wonderfully. However, as I add galleries, this list will get quite long. So, I wanted to add navigation which would break up the number of galleries into set quantities.
    When I introduced parameters to LIMIT the number of queries displayed based on a variable called SHOWMAX, my displayed data got all botched. admittedly, I'm adapting code from David Powers' book PHP Solutions and am learning as I go. I gave up on displaying all of the data shown above and went the simple route, figuring I'd add more features as I learned. This necessitated restructuring my database a bit.
    Here is the code I added that allows for navigation based on a limit of 3 entries per page:
    // set maximum number of records per page
    define('SHOWMAX', 3);
    // get the number of galleries
    $conn = dbConnect('query');
    $getGtotal = "SELECT COUNT(*)
                FROM galleries ";
    $g_total = $conn->query($getGtotal);
    $row = $g_total->fetch_row();
    $galTotal = $row[0];
    // set the current page
    $curPage = isset($_GET['curPage']) ? $_GET['curPage'] : 0;
    // retrieve subset of galleries
    $conn = dbConnect('query');
    // calculate the start row of the subset
    $startRow = $curPage * SHOWMAX;
    $sql = "SELECT *
            FROM galleries
            ORDER BY g_id DESC
            LIMIT $startRow,".SHOWMAX;
    $result = $conn->query($sql) or die(mysqli_error());
    $galSpec = $result->fetch_assoc();
    *** end of code.
    Along with some navigation code in the body:
    <div id="header4">
        <p>Displaying <?php echo $startRow+1;
              if ($startRow+1 < $galTotal) {
                echo ' to ';
                if ($startRow+SHOWMAX < $galTotal) {
                  echo $startRow+SHOWMAX;
                else {
                  echo $galTotal;
              echo " of $galTotal";
              if ($curPage > 0) {
                          echo '<a href="'.$_SERVER['PHP_SELF'].'?curPage='.($curPage-1).'"> Back </a>';
              if ($startRow+SHOWMAX < $galTotal) {
                          echo '<a href="'.$_SERVER['PHP_SELF'].'?curPage='.($curPage+1).'"> Next </a>';
              ?>
    I can now display my gallery information in groups of 3 per page.
    THE PROBEM IS that when I add additional queries, say to get the subject and category information, model, photograpger and or make-up artist information, it doesn't always come up, sometimes it messes up the display, and in all cases, this additional information disappears when I navigate from subset to subset. This is why I have been asking about carrying values from one page to the next.
    I am absolutely stonewalled and am going to have to put the galleries into service sans navigation until I can figure it out. I'm willing to even hire someone for advice. I just can not make this work. Yes, I realize it's complex for someone of my skill level, but I have no choice, I have to make this work.
    Alternate forms of navigation/showing subsets of records would be greatly appreciated. ANY help, suggestions or guidance will be greatly appreciated.
    Thank you for reading through all this.
    Most sincerely,
    wordman

    Again you are misunderstanding. I'm not suggesting hardcoding any values. I am only asking if you are/were trying to pass the actual subject and category descriptions, or the id's of category and subject so you can requery the database on each page.
    > I don't think the page re-queries on navigating, I think it just loads  info from the array.
    I don't think so. Just look at the SQL. It's using the limit and offset values which means to me that it's only returning the rows for the current page. What array are you talking about?
    >So, I added a separate query to pick this info from the DB, and it bombs  the page.
    I really believe you are going about this all wrong. Right now you are searching for solutions to specific problems without having a solid foundation in the technologies involved. Trying to build as you learn is a recipe for disaster and frustration. Stop what you are doing for a while. Work on some php and SQL tutorials that are unrelated to this project. Work through them until you understand what each line of code is doing.
    Right now you are headed down a rat hole. You may get most of it to work, but you will be plagued by bugs and scripts that are difficult to maintain.

  • Is that possible to display the user selection data in the printable page?

    Hi All,
    I'm going to add a printablepage button on my page.
    Here comes a questions.
    Is that possible to display the user selection data in the printable page?
    For example,
    I have a table in the page,with 10 records.User select 5 of them.Can I display these 5 records in the printable page?
    Please help.

    Hi Yannick,
    Thanks a lot for the information. It worked.
    The portlet data can be accessible using bindings, but parameter name can be different.
    Meanwhile I have got one more scenario, where the Portlet and Task Flow placed in different pages of WCP Application. On change of data in the Portlet the application should navigate to another page where the Task Flow placed and displays selected data.
    Basically I can not use any button for navigation. The navigation should happen once I do some action in Portlet.
    Is this possible? If yes can you please let me know the steps?
    Thanks in advance!
    Somnath
    Edited by: Somnath Basak on Dec 20, 2011 9:41 AM

  • How to move only subset of data from one database to another?

    Both source & destination are Oracle11g databases.
    The requirement details are as below,
    1) The database contains static as well as transactional data for telecom domain.
    2) We have to move region-wise data from one database to another.
    3) There are around 10 regions.
    4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
    static data & it will not change.
    5) The volume is around 1 million subscribers per region.
    6) The migration is required because
    a) The client is upgrading its base product which uses this database
    b) There is a change in structure of static tables
    c) Hardware upgrade
    d) The client want to start with single region on new database & rest of the regions will be operated from old
    database.
    7) Keep execution time to very minimum.
    I am thinking to have solution as below,
    1) Create destination database with upgraded db structure (as mentioned in 6b)
    2) Create database links to access source db in destination db.
    3) Write SQL queries to fetch data from all the respective tables for a specific region
    4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
    destination db
    a) Use FOR ALL & bulk collect to improve the performance
    b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
    5) Validate pre & post counts to verify the success of migration
    Is there any other better way?
    Regards,
    Sandeep

    How to move only subset of data from a partiular table by using transportable tablespace?
    E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
    The indexes defined on SUB table are under SMP_IDX_SUB tablespace
    The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
    any specific example would be helpful.

  • How to display metadata such as data load date in answers report title?

    We have a requirement to display the last load date of the data relevant to the report the user is viewing. We have such information stored in a metadata table listed by the fact table the report is referencing. Our proposed solution is to create new answers reports off of this metadata table and put each report (with the appropriate filter on the fact table) on each dashboard section where the corresponding report is placed. One problem with this approach is the load date information will not be reflected in the print form of the report as the date is dashboard content - not report content. Is there any way to overcome this situation (other than create a ton of variables specifically created for this purpose)? I'm open to entertaining javascript ideas, if necessary. I would love to know how to push this OBIEE envelope further. Thanks in advance.

    Hi,
    I discuss with some people who are familiar with SharePoint, we both thought Windows Explorer may
    not accept the custom metadata.
    if we want to do some customization, it is recommended to ask for help in development forum.
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?category=windowsdesktopdev
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • Can I get Pages to display small letters after dates i.e. 9th aug would have the th smaller at the top of the 9 like it does automatically in word?

    Can I get Pages to display small letters after dates ie. 9th Aug would have the th as small letters at the top after the 9 like it does automatically in word?

    Like this ?
    Open the Pages preferences and check the third button

  • How to display document last modfied date time in core result web part?

    Hi,
    We have a requirment in the sharepoint application where we need to display last modified date&time of document in core result web part.
    To support this we have specify the property <Column Name="Write"/> in custom XSL.
    But it displays only the modified date.Is there is way to display modified date and time as well?
    D.Ganesh

    If you want to modify the
    XML can do i tin the
    template "DisplayTemplate":
    An example:
    Replace
    <xsl:value-of select="write" />
    by
    <xsl:value-of select="ddwrt:FormatDate($write, 1033, 2)"/>
    But I think the managed property"Write"
    is returned only as
    Date without
    Time. By
    this time will
    always 00:00.
    To see the resulting XML
    can replace
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xmp><xsl:copy-of select="*"/></xmp>
    </xsl:template>
    </xsl:stylesheet>
    Where you see the format
    of "write"
    http://msdn.microsoft.com/en-us/library/ms546985(v=office.14).aspx
    Miguel de Hortaleza

  • Display last 12 months data in column chart

    Hi All,
    I have one  dashbord  requirement in list box i have (example:):  "oct-11" i need to display previous 12 mnth data in column chart anybody help in excel formula how to display last 12 mnths based on list box selection.
    example:  if i select oct-11 from list box i need to display in chart like
    nov-10 dec-10 nov-10...................................oct-11
    please provide how to write in logic in excel

    Hi Shankar,
    Try this formula in excel : DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))
    A1 will be your cell which is the destination of your List box. & then drag it till 12 months.
    If you are not having day from your list box then manually enter 1 in any cell and map that cell in place of A1 for day.
    HTH.
    Neeraj..

  • Displaying a group of data in different Pages

    Hello
    I will try to explain my Problem below briefly
    I have a problem with displaying a group of data in different Pages.I want to display a group of data like this:
    page1      page2
    data1Part1      data1Part2
    Page3     Page4
    data2Part1      data2Part2
    Page5     Page6
    data3Part1      data3Part2
    page 7     Page 8
    data4Part1      data4Part2
    What I get is :
    page1      page2
    data1Part1      data2Part1
    Page3     b]Page4
    data3Part1      data4Part1
    Page5     Page6
    data2Part2      data3Part2
    page 7     Page 8
    data4Part2      data4Part2
    I test <?for-each-group@section:ROW?> and Different first page etc. It doesn't work.I would appreciate your help. I can send you the output, template and xml doc, if you can have a look at it.
    Thanks

    Send me all files along with expected output at [email protected]

  • Displaying a group of  data in different colums

    I have a problem with displaying a group of data in different colums. I want to display a group of data like this:
    Column 1 --- Column2 ----- Column3
    data1 data6 data11
    data2 data7 data12
    data3 data8 data13
    data4 data9 data14
    data5 data10 data15
    That is, the coulm headers must be at the same height of the page and data must be in paralell columns.
    My number of data is variable depending on a query result, and I want to start displaying my group on the first column and when it is full (the number of records per column is fixed), is must switch into the next one.
    In case there were more than 15 records, the 16th and the followings, must be displayed on the next page, with the same format as i have explained before.
    Thank you very much.

    Send me all files along with expected output at [email protected]

  • Can you display a Last Modified Date anywhere on a PDF Portfolio?

    Can you display a Last Modified Date anywhere on a PDF Portfolio?
    Thank you for the help!
    I am using Adobe Acrobat X Pro.

    There is no generic SQL way for this. It depends completely on the features your DBMS offers. With Oracle you'd need to create column which gets updated in a trigger. I believe MS SQL Server offers a special data type for this, which is updated automatically. I don't know about others.

  • HT2905 My itunes looks nothing like the examples in this tutorial.  I do not have "display exact duplicates" or "date added".  Can someone please help me remove duplicate songs?  Also, I downloaded two audio books and they are showing up in my song list.

    My itunes looks nothing like the examples in this tutorial.  I do not have "display exact duplicates" or "date added".  Can someone please help me remove duplicate songs?  Also, I downloaded two audio books and they are showing up in my song list. Why???

    'Show duplicates' is now under the 'View' menu. To see the 'Date added' column go to 'View options' from the 'View' menu and check it in the section under 'Stats'.
    Click an audiobook once to select it and hit command-i (Mac) or control-i (Windows). Go to the 'Options' tab and set 'Media Kind' to 'Audiobook'.

  • How do I get Contacts to display yyyy-mm-dd date format?

    How do I get Contacts to display yyyy-mm-dd date format?

    This works in Microsoft Outlook, but not sure if it works in Apple Contacts.
    In System Preferences > Date & Time select Open Language & Region.
    Click on Advanced
    Under the Dates tab you can customize settings.
    You might need to restart your Mac after making the settings.

  • To display execise number and date in smartform

    Hi Abappers,
    i want to display execise number and date in smartform and by using driver program also.
    i have taken fields from vbrk,vbrp and send to final internal table,but now i want to display execise number in my Smartform also.
    Thanking u,
    sri.

    Create a window inside window create text element inside that insert field your excise number and date field names.
    Go to form interface -> import parameters declare your internal table name type vbrp/vbrk.
    In your print program smart form function module pass this table.

  • Displaying operating unit specific data in Discoverer Report ????

    Hi Experts,
    My Requirement : I need to develope one custom report where it has to display operating unit specific data based on the resposibility selection in Discoverer.
    My Approach : I prepared the below query and I am trying to pick Business_group_id from profile options and passing to the query.(You can observe the condition which is highlighted as red color)While i am running the query I am getting zero records.
    Please suggest me how to achieve the my requirement of displaying operating unit specific data in Discoverer.
    SELECT  A1.PERSON_ID
           ,A1.employee_number
           ,A1.first_name
           ,A1.last_name
           ,A1.known_as PREFERRED_NAME
           ,A1.GENDER
           ,A1.date_of_birth
           ,A1.Marital_status
           ,A1.original_date_of_hire
           ,A1.Organization
           ,A1.Location
           ,A1.Job_name
           ,A1.OLF_DEPARTMENT
           ,A1.OLF_DEPT_SUBGROUP
           ,A1.salary
           ,A1.salary_change_date
           ,A1.HIRE_DATE
           ,A2.PERSON_ID SUPERVISOR_ID
           ,A2.EMPLOYEE SUPERVISOR
           ,A3.PERSON_ID SUPERVISOR_ID_1
           ,A3.EMPLOYEE SUPERVISOR_NAME_1 
    FROM (
    SELECT PAPF.first_name
          ,PAPF.last_name
          ,papf.known_as
          ,papf.sex GENDER
          ,papf.date_of_birth
          ,papf.marital_status
          ,papf.employee_number
          ,PAPF.person_id
          ,PAAF.supervisor_id     
          ,PAPF.original_date_of_hire
          ,(SELECT name FROM  hr_all_organization_units WHERE Organization_id=PAAF.organization_id) Organization
          ,(SELECT location_code FROM  hr_locations WHERE location_id=PAAF.Location_id) Location
          ,(SELECT name FROM  per_jobs WHERE job_id=PAAF.job_id) Job_name
          ,PPP.proposed_salary_n SALARY
          ,ppp.change_date salary_change_date
          ,ppgk.segment1   OLF_DEPARTMENT
          ,ppgk.segment2  OLF_DEPT_SUBGROUP
          ,papf.original_date_of_hire HIRE_DATE
      FROM per_all_people_f PAPF 
          ,per_all_assignments_f PAAF
          ,per_pay_proposals  PPP
          ,PAY_PEOPLE_GROUPS_KFV ppgk
    WHERE 1=1
       AND PAPF.person_id=PAAF.person_id
       AND papf.business_group_id=paaf.business_group_id
       AND PAAF.assignment_id=PPP.assignment_id
       AND paaf.people_group_id=ppgk.people_group_id
       AND ppp.change_date =(SELECT MAX(change_date)
                               FROM per_pay_proposals
                              WHERE assignment_id=PPP.assignment_id)
       AND SYSDATE BETWEEN PAPF.effective_start_date AND PAPF.effective_end_date
       AND SYSDATE BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date<font color="red">AND PAPF.BUSINESS_GROUP_ID = TO_NUMBER(FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID '))</font>
    ) A1
    SELECT PAPF.first_name
    ||','||PAPF.last_name EMPLOYEE,PAPF.PERSON_ID,PAAF.supervisor_id     
      FROM per_all_people_f PAPF
          ,per_all_assignments_f PAAF
    WHERE PAPF.person_id=PAAF.person_id
    AND papf.business_group_id=paaf.business_group_id
       AND SYSDATE BETWEEN PAPF.effective_start_date AND PAPF.effective_end_date
       AND SYSDATE BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
    ) A2
    SELECT PAPF.first_name
    ||','||PAPF.last_name EMPLOYEE
         ,PAPF.PERSON_ID
          ,PAAF.supervisor_id     
      FROM per_all_people_f PAPF
          ,per_all_assignments_f PAAF
    WHERE PAPF.person_id=PAAF.person_id
    AND papf.business_group_id=paaf.business_group_id
       AND SYSDATE BETWEEN PAPF.effective_start_date AND PAPF.effective_end_date
       AND SYSDATE BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
    ) A3 
    WHERE 1=1
    AND  A2.PERSON_ID(+)=A1.SUPERVISOR_ID
    AND  A3.PERSON_ID(+)=A2.SUPERVISOR_ID
    AND  A4.PERSON_ID(+)=A3.SUPERVISOR_ID
    ;

    you are in the wrong forum, try an ebusiness-related forum, maybe this OA Framework

Maybe you are looking for

  • Day 5 of uploading

    And still have over 2000 songs to go. I had a ton of unmatched songs, but is it really acceptable that it should take over a week (or more!) to upload everything I have? I have good bandwidth here, so that's not the problem. It's really not ok.

  • Account assignment mandatory for material

    Hi, While creating contract i am facing this warning message..i can ignore this message , but what is the root cause for it. Error is : "Account assignment mandatory for material 100000040 (enter acc. ***. cat.) Message no. ME062 Diagnosis There is n

  • K7n2 with a serial ata addin card

    I have a k7n2 without the serial ata controller, athlon 2400, 512 mb ddr 333, and a winfast geforce 2 mx 64.  my question is will i be able to boot off of an addin serial ata card and a western digital raptor 36 gig hard drive.  also will the bios be

  • Can anybody tell me how I set an hiperlink in the new Adobe Muse CC 2014...

    Can anybody tell me how I set an hiperlink in the new Adobe Muse CC 2014...?

  • How to find abandoned podcasts

    I am searching for sports podcasts that have discontinued producing episodes. How do I go about finding them? My iTunes version is up-to-date.