Selecting certain data from Array

Here is the issue I am faced with.
I am currently using an HTTPService call to a PHP document
that builds XML. I then take that XML and place it into an Array,
(pretty basic as you can tell.)
What I am dealing with is that I have 15 tabs that all
contain similar "notes" sections. I would really like to run 1
HttpService that returns all of the data form the notes, (note
data, username of note) and then placing the appropriate notes data
to the appropriate tab and data grid container.
So I didn't know if there was a way you could select only a
certain part of an Array and then populate a datagrid with that
particular data?
Almost like cutting pieces of a large array out and
displaying thos pieces on different tabs.
Any help is appreciated.

Array has many functions that you can use to do pretty much
anythin goyu eant on it,
filter () method
AS3 function filter(callback:Function, thisObject:* =
null):Array
Executes a test function on each item in the array and
constructs a new array for all items that return true for the
specified function. If an item returns false, it is not included in
the new array.
map () method
AS3 function map(callback:Function, thisObject:* =
null):Array
Executes a function on each item in an array, and constructs
a new array of items corresponding to the results of the function
on each item in the original array.
etc .. look up in API documents it has examples too :
http://livedocs.adobe.com/flex/3/langref/index.html

Similar Messages

  • Selecting specific data from an array controlled by a boolean array

    Hi!
    I am trying to select specific data from a string array. The string data should be auto indexed to a string array indicator, but I just want specific values to be placed in the new array.
    A boolean array controls when data should be auto indexed to the new string array. Every time a true appears in the for loop, the string data should be placed in the new string array, but I have a problem. I manage to pick the specific data to place in the new array, but i also get empty strings in the array when I am not supposed to write to the array. Instead of empty strings, I want my string data to be "compact". So when bool number 3 in the array is true, I want that string data to be in row 1, and not row 3.
    Can you help me sort this one out?
    Best regards
    Is my avatar the dog from the fraggle rock?
    Attachments:
    testprogram_forum.vi ‏10 KB
    Spørsmål lwforum.jpg ‏74 KB

    Here is a different version that also changes the size of the array for the indicator when the value is changed. You could do as much as you want here.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    testprogram_forum 2.vi ‏12 KB

  • Select max date from a table with multiple records

    I need help writing an SQL to select max date from a table with multiple records.
    Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
    SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
    0000651005 BASE 15-AUG-07 YES
    0000651005 BASE 13-NOV-09 NO
    0010973671 BASE 20-MAR-08 YES
    0010973671 BASE 18-JUN-10 NO

    Hi,
    Welcome to the forum!
    Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
    For example:
    CREATE TABLE     table_x
    (     sa_id          NUMBER (10)
    ,     char_type     VARCHAR2 (10)
    ,     effdt          DATE
    ,     char_val     VARCHAR2 (10)
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
    COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
    `    SA_ID LAST_EFFD
        651005 13-NOV-09
      10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
    Here's how to get those results:
    SELECT    sa_id
    ,         MAX (effdt)    AS last_effdt
    FROM      table_x
    GROUP BY  sa_id
    ;

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

  • Selecting all data from employee where foreign key = null and show it in view

    Hi guys i have view like following :
    SELECT dbo.Nationality.NationalityName, dbo.Employee.DriverName, dbo.Employee.DriverID, dbo.Employee.NationalityID, dbo.Employee.ResidentNo,
    dbo.Country.CountryName, dbo.Employee.CountryID, dbo.Branch.BranchName, dbo.Employee.BranchID, dbo.Employee.JoinDate,
    dbo.Employee.ResignDate, dbo.Employee.HealthCarNo, dbo.Employee.JobID, dbo.Jobs.JobName, dbo.Department.DepartmentName,
    dbo.Jobs.DepartmentID, dbo.Employee.PlaceIssue, dbo.Employee.Deduction, dbo.Employee.ExpireDateMedical, dbo.Employee.PolicyNumber,
    dbo.Employee.Owner, dbo.Employee.Version, dbo.Employee.ExpireDateResident, dbo.Employee.Salary, dbo.Employee.SexID, dbo.Sex.SexType,
    dbo.Sex.FlagSex, dbo.Employee.MiritialID, dbo.Miritial.MiritualStatus, dbo.Status.StatusType, dbo.Employee.StatusID, dbo.Employee.UnactiveReason,
    dbo.Employee.BirthDate, dbo.Employee.DateToday, dbo.Employee.UserID, dbo.Employee.PassportNo, dbo.Employee.Period,
    dbo.Employee.AccountNo, dbo.Employee.Bonus, dbo.Employee.AccountType, dbo.Employee.PlaceOfBirth, dbo.Employee.EmplyeeName,
    dbo.Employee.ExpireDateresidentHijri, dbo.Employee.PassportDateStart, dbo.Employee.PassportDateExpire, dbo.Religon.ReligonName,
    dbo.Employee.ReligonID
    FROM dbo.Nationality INNER JOIN
    dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID INNER JOIN
    dbo.Country ON dbo.Employee.CountryID = dbo.Country.CountryID INNER JOIN
    dbo.Branch ON dbo.Employee.BranchID = dbo.Branch.BranchID INNER JOIN
    dbo.Jobs ON dbo.Employee.JobID = dbo.Jobs.JobID INNER JOIN
    dbo.Department ON dbo.Jobs.DepartmentID = dbo.Department.DepartmentID INNER JOIN
    dbo.Sex ON dbo.Employee.SexID = dbo.Sex.SexID INNER JOIN
    dbo.Miritial ON dbo.Employee.MiritialID = dbo.Miritial.MiritialID INNER JOIN
    dbo.Status ON dbo.Employee.StatusID = dbo.Status.StatusID INNER JOIN
    dbo.Religon ON dbo.Employee.ReligonID = dbo.Religon.ReligonID
    suppose i need to show all data from Employee table (NationalityName,BranchName,JobName) where
    NationalityID =NULL OR BranchID=NULL OR JobID=NULL
    WHAT I DO
    Notes : I mean in topic(selecting all data from view not table
    meaning i need to show all data in employee table by view
    in case of forign key(any forign key)equal null

    I think you need to change 
    FROM dbo.Nationality INNER JOIN
    dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID
    to
    FROM dbo.Nationality
    LEFT JOIN
    dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • To Select the data from two table one is transp table and onther is cluster

    Hi All,
    I want to select the data from two tables
    Here i am giving with an example.
    Fileds: kunnr belnr from bseg.  table bseg
    fields: adrnr from kna1     table: kna1.
    Know i want to put these into one internal table based on kunnr and belnr.
    Thanks in advance.
    Ramesh

    Hi,
       U cant use joins on cluster table and BSEG is a cluster table so use FOR  ALL ENTRIES for taht
    refer this code
    *&      Form  sub_read_bsak
          text
    -->  p1        text
    <--  p2        text
    FORM sub_read_bsak.
    *--Select data from BSAK Table
      SELECT lifnr
             augdt
             augbl
             gjahr
             belnr
             xblnr
             blart
             dmbtr
             mwskz
             mwsts
             sgtxt
             FROM bsak
             INTO CORRESPONDING FIELDS OF TABLE it_bsak
             WHERE belnr IN s_belnr
             AND   augdt IN s_augdt.
      IF sy-subrc EQ 0.
    *--Sort table by accounting document and vendor number
        SORT it_bsak BY belnr lifnr.
      ENDIF.
    ENDFORM.                    " sub_read_bsak
    *&      Form  sub_read_bseg
          text
    -->  p1        text
    <--  p2        text
    FORM sub_read_bseg.
      IF NOT it_bsak[] IS INITIAL.
    *--Select data from BSEG table
        SELECT belnr
               gjahr
               shkzg
               kostl
               hkont
               ebeln
               ebelp
               FROM bseg
               INTO CORRESPONDING FIELDS OF TABLE it_bseg
               FOR ALL ENTRIES IN it_bsak
               WHERE belnr EQ it_bsak-belnr
               AND   gjahr EQ it_bsak-gjahr
               AND   shkzg EQ 'S'.
        IF sy-subrc EQ 0.
    *--Sort table by accounting document
          SORT it_bseg BY belnr.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_read_bseg

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • Writing data from array to file

    May i know how to write string from a array into a file.
    I have use string tokenizer to extract every line from a file using readline and use stringtokenizer to spilt the line using tab delimiter for processing.
    But if i want to write data from array to file with tab as a delimiter and how to go to the next line. How do i do that. Below is the task and i have state a simple example on a array i have and the file output that i want.
    Pls advice.. Thanks
    eg of a array
    array[0] = Data
    array[1] = One
    array[2] = Data
    array[3] = Two
    array[4] = Final
    array[5] = Data
    From the above array, i want to write to a file so that it will appear something as below
    Eg textfile.txt
    Data One
    Data Two
    Final Data
    PLs attached a simple code as a example as i am only begining to start useing the IO feature in java. Thanks

    Really thanks for your help,
    but u are mentioning that i have already know the number of countters in advance , that is to say the 2 * counters.
    But is there a way to solve this problem which i mean if i dun know the number of predefined counters. Maybe i should say, there is more than 2 counters and in another situation, the counters will only be defined during runtime. Actually the solution u give will work nicely with 2 counters. but wat if the counter is more than 4, i wll have to concatenate the string a lot of time. so is there any solution around this problem. That why i am wandering if tere is any solution to write to the file when the counters can be only determined in runtime
    Pls advice on the above with a code samples if possible.

  • Too big switch - get data from array

    I have text file (CSV). Parse file and set data to array, e.g. ArrayList. Get data from array and initialize object MyDoc (by setXXX methods)
         for (int index = 0; index < list.size(); index++) {
                   currentElement = list.get(index);
                   switch (index) {
                   case 0:
                        myDoc.setField1(currentElement);
                        break;
                   case 1:
                        myDoc.setField2(currentElement);
                        break;
                   case 70:
                        myDoc.setField70(currentElement);
                        break;OK. But problem is that object MyDoc have many fields (70 fields). And "switch" become to big. (70 setXXX methods). Can I set fields to object MyDoc without "switch"?

    johndjr wrote:
    Just don't use a switch. It is not really helping any in this case.
    you can just do all the calls explicitly.
    Like so
    myDoc.setField1(list.get(0));
    myDoc.setField2(list.get(1));
    myDoc.setField70(list.get(69));I might convert the list to an array first simply because it seems more natural to me.
    I'm not too sure if it really matters all that much if list is an ArrayList.
    String[] values = list.toArray();
    myDoc.setField1(values[0]);
    myDoc.setField2(values[1]);
    myDoc.setField70(values[69]);you should check that toArray() call, I might not have the correct method I'm kind of doing this off the cuff.I think it is second thoughts day.
    I don't like the hard coded numbers. what I wrote should have defined constants for those values.
    static final int FLD1 = 0;
    static final int FLD70 = 69;
    String[] values = list.toArray();
    myDoc.setField1(values[FLD1]);
    myDoc.setField2(values[FLD2]);
    myDoc.setField70(values[FLD70]);
    Edited by: johndjr on Apr 17, 2009 1:33 PM
    forgot the constants

  • Can one Sync select apps data from say a desktop G5 to a MBP?

    I was wondering if iSync has the ability to sync certain apps data between a traveling MBP laptop and my everyday home desktop G5?
    For example, I want to just sync very specific things like:
    -my Captain FTP data so I can keep FTP data current on my laptop as it is my desktop where I mess with it most
    -1Password data so my updated 1Password access data from my daily desktop can get sync'd over to a MBP
    -Entourage User Identity "database"
    these are just examples and I am not even sure iSync is designed to do this type of sync and, can you even select what it syncs?
    if not, any other ideas other than just manual slow carry-over via target Disk Mode.

    No, iSync is only for syncing Contacts and Calendars between Address Book / iCal and non-Apple mobile phones.
    Google "ChronoSync" for something that may do what you want.

  • Database Adapter: Selecting all data from table

    Hi All
    I am new to SOA Suite and I am using Soa Suite version 10.1.3.1 and Jdev version 10.1.3.3. It is required to select data from one database using the database adapter and insert it in a table in another database. I implemented the flow using DBadapters select operation the problem is everytime I am running the instance it transfers only one row though no condition has been specified on the select. Could anyone please help me out and let me know how to transfer a complete table from one database to another using DBadapters and in a single instance.
    Thanks

    Well Stupid me, got the answer, I think m just at the begining of the learning curve.

  • Data retrieve data from array PL/SQL is "???"

    Hi,
    I follow the sample code shown in getting the data of PL/SQL using Java.
    Please see below:
    OracleCallableStatement stmt =(OracleCallableStatement)conn.prepareCall
    ( "begin ? := getEMpArray; end;" );
    // The name we use below, EMPARRAY, has to match the name of the
    // type defined in the PL/SQL Stored Function
    stmt.registerOutParameter( 1, OracleTypes.ARRAY,"EMPARRAY" );
    stmt.executeUpdate();
    // Get the ARRAY object and print the meta data assosiated with it
    ARRAY simpleArray = stmt.getARRAY(1);
    System.out.println("Array is of type " + simpleArray.getSQLTypeName());
    System.out.println("Array element is of type code "+simpleArray.getBaseType());
    System.out.println("Array is of length " + simpleArray.length());
    // Print the contents of the array
    String[] values = (String[])simpleArray.getArray();
    for( int i = 0; i &lt; values.length; i++ )
    System.out.println( "row " + i + " = '" + values +"'" );
    But when i view the data from java the data that is being fetch is "???". All the array data is like this "???".
    But when i debug the PL/SQL the data is OK.
    I dont know if this is a binary numbers or what.
    I dont know how to solve this. And get the real data.
    Please help.
    Thanks.
    Edited by: user652585 on Oct 22, 2008 9:02 AM

    I'm guessing that your database NLS_Language settings don't match your clients.
    Go into the project properties->compiler->encoding and choose the right caracter set to match your database's one.

  • Need to pull certain data from certain documents

    First off if you know of a more acceptable place to post this please let me know
    Ok here is my scenario, i receive these documents in excel files they have users first and last name, badge number, email, E.T.C. Now i want to extract just the badge number out of this excel document. So my first question is i want to do this with a java program so what do i want to research about to make a java program that searches one of these excel documents and assuming it is space dillimeted pulls just the badge number out?
    Then i have another document called NCAS, this document has every employee listed only unique thing here is badge number and username but i want to take the badge number out of the first document and use this badge number to search my NCAS document. This will bring up a line in the document with user badge number username phone , e.t.c. again this document is space dillemited. So i want it to pull a field out of this document which i believe is the first one copy it.
    Then for my third thing i want to transfer this copied username over to a esb (oracle product) which has a database adapter on it and use it to input this username and query through our oracle database that username after that im going to use esb database connector to assign users responsibilities. but thats another project im just trying to extract certain information from certain documents i will worry about insserting this into a database later
    I guess what i would ask is can someone direct me to something that explains how to pull entries out of a document or something to that nature maybe at the same time how can i implement my java program that is pulling data out of files and incorprate that with an esb project that involves database adapters
    Message was edited by:
    vande

    Hi Vande,
    Just a comment. You will often get that type of response to a question that Google answers well, especially if it's a recurring question that has been asked and answered lots of times. Have a look at http://www.catb.org/~esr/faqs/smart-questions.html for some pointers.
    If you had said,
    "I searched Google/this forum, found a few ideas, and am looking for feedback from anyone who has tried this and might be able to help me pick the best way"
    you would have likely got a response more in line with what you were looking for. Also note that searching this forum for "java excel" found lots of interesting hits.
    Best,
    John

  • I need to select certain files from TM to transfel to my Macbook Pro

    I bought a new machine and installed my system from time machine. I HAD a macbook from 2005 that had the airport connectivity issue. Apparently the glitch transferred via TM to the new Macbook Pro and I couldn't connect wirelessly. I worked with someone and we tried everything, even a disk repair form the CD but the problem couldn't be resolved. I erased the HD and reinstalled OS X from the disk and didn't use TM (network issue is solved).
    Now I need to access my files, and some software, from TM and put them on the new machine. How do I do that? When I open TM, the computer wants to format a new drive. I tried opening the existing external drive and a "Mobile Me" message popped up. I closed that out and did not try to go any further.

    cbmgk wrote:
    Now I need to access my files, and some software, from TM and put them on the new machine. How do I do that? When I open TM, the computer wants to format a new drive.
    Do you mean using +Select DIsk+ on the Time Machine Preferences window? If so, then no, you don't want to set up Time Machine to do backups (yet).
    If the connectivity issue is solved, you should be able to use +Migration Assistant+ to transfer your apps, users, and data, from the last backup. See Using Migration Assistant.

  • HR Form do not select any data from specific Period

    Hi All
    I am facing issues on the HR FORMS for Brazil related to the Remunaration Statement
    When I try to select any employee from a specific period (before April 2012), the system does not select any data.
    From April 2012 until the current period and I could select the data and print the Form
    I do not believe that is related to the Master data from the Employee, since it is always related to the same period, I guess it is on the HR Form configuration, retricting the period anywhere, but I could not find it
    do you know any idea on how to fix it ?
    Regards

    Hi Steve,
    In SQL Server Analysis Services, we can hide or disable hierarchy level by using
    AttributeHierarchyEnabled property, however, when this property is set to false, this level will not appear no matter if contain data or not. In your scenario, you want to hide the hierarchy level dynamically, right? As Aleksandr
    said, I am afraid there is no such a method to achieve it.
    If you have any concern about this behavior, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
    in the following release after official confirmation.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • ITunes 11.0.2.26 issue for Windows 8 Pro "app store is blank" in iTunes Store

    Hi, I recently updated my iTunes software to 11.0.2.26 in my Windows 8 Pro 32bit OS. Since then I was puzzled why I am not able to view/access my iTunes store in iTunes as app store is complete blank. Where as I was able to do all other things like s

  • BPM with waiting status in MONI

    hi forum ... in a fille to file scenario...with BPM..... there are two receivers and 1 send step.... its like receiver1-->receiver2----->send1 when the scenario runs.......it receives a particular message for "receive2".....which i cant provide right

  • Equium L20 - memory not shown correctly?

    Hi I have just purchased an Equium L20.First time I have had a Laptop.In the specs it says 256mb memory.But when I checked the system it says that I have 192mb.Where is the the other 64mb ?.Or am I just dimmer than I thought. [Edited by: admin on 13-

  • Oringinal song files cannot be found

    I just bought a My Book external hard drive because I was running out of room on my computers hard drive and I transfered all of my music and videos over onto the My Book hard drive. I went into my iTunes preferences and changed the iTunes music fold

  • Will not load windows

    trying to get comp. bootable or restored to factory if i try to boot from hd in safe mode gets down to mup.sys and stops stays like there till i shut it down i have the restore disks they will only load until setup says "setup is starting windows" th