Referencing of the values in the array Collection?

I use a remote object to pass an argument to a CFC. I then query a table based on the value of the argument past ("where" clause). I have to return a single record result as an application in Flex (event.result) and set it as a Collection of table, example:
myAC = new ArrayCollection collection;
myAC.source = event.result as Array;

I can take this AC and set it as a dataprovider to a DataGrid or a list without problem. What I want to do is to extract specific data from HQ and use it in my Flex application. For example, the results of my query will return 1 record only, but it contains a lot of columns in my table. It may contain an ID, a user name, a first and last name, perhaps a phone, etc. All of this information so that only the record will be stored in the collection of table. I want to do is be able to reference these data in Flex.

For example, if I need to post (stored under the telephone number of my request) phone number in the collection of table, how can I do this? myAC.phoneNumber? myAC.getItemAt (0) .phoneNumber?

Any guidance is appreciated

I'm not sure to deal with a remote object / CFC configuration, but if your collection is largely as:

var myAC:ArrayCollection = new collection ArrayCollection ([{name: "first", phone number: '555'}]);

Then Yes you should be able to access it with:

myAC.getItemAt (0) .phoneNumber

I take it not worked?

Tags: Flex

Similar Questions

  • How do I filter the Array collection

    Hello friends

    I do a simple little application in which I use a Datagrid collection and table as a dataprovider.just like that.

    private var mainArrcollection:ArrayCollection = new ArrayCollection([)
    {name: "vineet" rollno: ' 14', age: '24'},
    {name: "osho" rollno: ' 15', age: '34'},
    {name: "sharma" rollno: ' 16', age: '44'}
    ]);

    now I want to filter a specific data on this arraycollection.i: change the dataprovider to

    private var tempArrcollection:ArrayCollection = new ArrayCollection([)
    {name: "osho" rollno: ' 15', age: '34'},
    ]);

    Click some button on and set this new array as a dataprovider to on.can datagird, and therefore any body guide me how to achieve this function.

    Thank you and best regards

    Vineet Osho

    Hi Aditya,

    You can do something like this...


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete =" onCreationComplete () ">"

      Import mx.utils.ObjectUtil;
    Import mx.collections.ArrayCollection;
    [Bindable] private var mainArrcollection:ArrayCollection = new ArrayCollection([)
    {name: "vineet" rollno: ' 14', age: '24'},
    {name: "osho" rollno: ' 15', age: '34'},
    {name: "sharma" rollno: ' 16', age: '44'}
    ]);

    [Bindable] private var dgArrcollection:ArrayCollection = new ArrayCollection();
      
      
    private function onCreationComplete (): void
    {
    dgArrcollection.addItem (mainArrcollection.getItemAt (comboBox.selectedIndex));
    }
    private void comboBoxChangeHandler(event:Event):void
    {
    var _selectedIndex:int SelectedIndex = (event.currentTarget as ComboBox)
    dgArrcollection.removeAll ();
    dgArrcollection.addItem (mainArrcollection.getItemAt (_selectedIndex));
    }
    ]]>


              
     
                  
                  
      
     


    Thank you

    Jean Claude

  • How to pass Array Collection to the test?

    Hello

    I'm going through the c# collection (ArrayList) of application object in TS. I output value assigned in TS container, but when executing end of sequence, then an error occurred: "value specified to not the expected type".

    What should I do to get full access to my ArrayList? What kind of type of variables should I assigned ArrayList?

    Thanks for the help anyway.

    Piotr

    Hello

    It should work if you use ObjectReference rather a container

    Discover this simple example

    Concerning

    Jürgen

  • Type a table defined clusters to hold configuration data - definition of default values for each element of the array

    Hello

    I was wondering if I could get some information and opinions on the use of an array of type defined clusters to store configuration data.  I am creating a program to test several EHR and wanted to have a control of type defined for each HAD with the information needed to create the DAQmx tasks for all signals for it must HAVE.  I am eager to do so that the data are encoded in hard and not in a file that the user might spoil.

    Controls of type def are then put into a Subvi who chooses as appropriate, one based on the enumeration of Type DUT connected to a case structure.

    I have problems with the control of the defined type.  I see issues when you try to save a configuration unique to each element of the array in the array of clusters.  Somehow, it worked at first, but now by clicking on "Operations on the data--> default font of the current value ' on individual elements of the cluster or the entire cluster (array element) does not save data when I re - open the command def.  What I am doing wrong?  I'm trying to do something with the berries of the clusters that I shouldn't do?

    I enclose one of the defined reference type controls.  I tried to change it bare to see if that helped, but no luck.

    To reproduce, change the resource string for the element 0 of the array and do the new value by default.  Then close the def of type, and then reopen it.  The old value is always present in this element.  The VI is saved in LabVIEW 2012.

    The values of a typedef are not proprigated to the instances of the control. They get if created WHEN data values have changed. They will be not updated with the changes to come. You must create a VI specifically to hardcode your values or to implement a file based initialization. The base file would be much better and more flexible. If you don't want users to change the data simply encryption. There is a wedding blowfish library that you can download.

  • How to read the size of the array, eliminating empty values

    I have an array of size 2 X 10. In the first column, the elements are 10 and in the second column, the elements are only 6. If I use the size of the array and the size of the second column of the index, the value given is 10 which is supposed to be 6. I noticed that it creates null or empty values in the column for the other four. How can I eliminate empty values, and only get the real sze of the column?

    The column in the index and use search 1 D table for an empty string.  The result should be the number of non-empty strings.  If the result is - 1, use the actual size of table.

  • Change the value of the array element without using the keyboard

    I have a control array on my front, say 1 d, 10 items.

    In addition, the front panel should be used with a touch screen, so I have a Subvi keyboard that should be called when I choose one of the elements of the array.  Therefore, no keyboard entry is allowed.

    My question is, how can I determine which element that the user hit/clicked?... .and how to change this value?

    -Mike

    Gents nevermind, found a way to emphasise that if this is the best way, but I got it.

    In my structure of the event, I have an event looking for the mouse event down in regards to the control array.  This event triggers my screen touch keyboard Subvi to fire, and the closure of the Subvi I pass its value to the ArrElem.Value property to assign the table a hit/clicked item.  Works.

    -Mike

  • Count of values in the array

    Hi, I believe that it is clear as the sky, but I can't seem to solve.

    I have a 2D chart filled with random numbers. I need to create a table 1 d representing the frequency of occurrence of these figures.

    For example: my 2D table has number between 1 and 100, and I want to check how many times the number 25 appears. I need my table 1 d to show this value according to the index of 25.

    Thank you very much

    Looking for functions of mathematics-> Prob & Stat palette histogram.

    Oh and reshape the array of programming-> Array, change your table table 1 d 2d

  • default value for the size of the array

    GDay,

    I have a cluster with some values and an array of Boolean. I use the cluster in different screws, so I recorded it with a typedef.

    I would like to add a required table for my table size 2-dimensional Boolean. How can I afford?

    Thank you very much

    bemvo

    Store default values or using the table to really reshape does not execute the action to force a mandatory array size. You can't really set a size of array binding 'automatically '. A programmer can plop down your typedef on the block diagram and change the number of lines/columns in any way they want, regardless of whether it has default values. This way, your program must check each time the cluster is used. If you choose to generate a mistake is yours, depending on which means that data.

    On a broader note, LVOOP (or similar) can be used for this sort of thing. By example, if you had an accessor function to set the table this accessor function can check that the size of the array.

    You may also be able to do with XControls, but I don't know since I have very little familiarity with the people.

  • read the values of an array element and by sending a digital output to a designated channel according to the value read from the table

    Hello world

    could someone help me before I get out of my hair. Here's my problem.

    I read 3 values of an array of 3 elements i.e. 1,2,3. These values are then compared to a constant value, example if the first element of the array is 1 and it meets the comparison condition can send a digital camera of output for that channel on data acquisition

    I want to be able to send a value from a table to its corresponding comparison and then on its designated channel on the acquisition of data, the whole point of this is due to the fact the table element will not always read the value 1,2,3 for example could be 2,3,1

    Here's one the vi I have so far

    If someone could help it would be much appreciated

    all the best

    brand

    Take time to explore the many examples included with LabVIEW that cover the basics.

    -Indexing table

    -reading a spreadsheet file

  • count the pixel values in an array

    Hello

    I converted my image into a 2D array, then I use the array subset function to return the subarray of my columns in 1023.

    Now I want Rich Textlike to analyze my image vertically in a column to add the pixel values in each column and return the result for each column. So I would like to extract the indexof the minimum value, which is what I'm looking for.

    I have an idea please let me know.

    enclosed please find my vi

    Thank you

    Looks like you are doing things the hard way.  Instead, I suggest using IMAQ LinearAverages rather at the entrance of the rectangle in option.  This will give you the average of each column, which is just the total divided by the number of pixels.  You can then use the Min search the index of the smallest value table.

    Bruce

  • Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel?

    Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel? Examples or suggestions would be greatly appreciated.

    Thank you

    Tunis

    Thank you Adam, it's originally in a while loop, I placed it in a loop for example, wired County in the for loop and presto, this son of a digital indicator. It works very well. Thanks for the help folks.

  • How to upgrade a table column using the values in the Oracle collection

    create or replace procedure test_coll
    
    IS
    
    CURSOR upd 
    IS
    SELECT CONTACT_NAME FROM Supplier_16;
    
    TYPE dept IS TABLE OF upd%rowtype;
    cur_var dept;
    
    Type List Is table Of  varchar2(20);
    Name List:=  List('Shilpi','Sunil','Shreyas','Saral');
    
    BEGIN
    
    OPEN upd;
    LOOP
         FETCH upd BULK COLLECT INTO cur_var;
    --    EXIT WHEN upd%NOTFOUND;
    
         FORALL i IN cur_var.FIRST..cur_var.LAST
      
         UPDATE supplier_16
    **  SET Contact_name= name(i);  ***
         
         COMMIT;
    
    END LOOP;
    CLOSE upd;
    
    END;
    On the "BOLD" line, I don't know how I should move the values of the collection of name I said without which are set all the values in the table supplier_16 = 'Saral.

    Help, please.

    Aashish S. wrote:
    Thank you very much...

    Yes, I slide collections and was trying to reach somwthing on similar lines to which you provided the code example...

    My essay is equipped to take a collection: initialized with values of say 3-4...

    Take other tables... A column... and update the column in the table (not PK, FK anything) using the values of the initialized collection...

    However, I am stuck between the two on how the UPDATE clause should be...

    OK, if it's just because you want to practice with collections, you might do something like this...

    SQL> set serverout on
    SQL> create table supplier_16 as
      2  select 'Frederick' as contact_name from dual union all
      3  select 'Robert' from dual union all
      4  select 'Jeremy' from dual union all
      5  select 'Simon' from dual
      6  /
    
    Table created.
    
    SQL> create or replace procedure test_coll is
      2    CURSOR upd IS
      3      SELECT CONTACT_NAME
      4      FROM Supplier_16
      5      FOR UPDATE;
      6    Type List Is table Of  varchar2(20);
      7    Name List := List('Shilpi','Sunil','Shreyas','Saral');
      8    v_contact_name varchar2(30);
      9    v_idx          number := 1;
     10  BEGIN
     11    OPEN upd;
     12    LOOP
     13       FETCH upd INTO v_contact_name;
     14       EXIT WHEN upd%NOTFOUND;
     15       UPDATE supplier_16
     16       SET    contact_name = name(v_idx)
     17       WHERE CURRENT OF upd;
     18       DBMS_OUTPUT.PUT_LINE(v_contact_name||' update to '||name(v_idx));
     19       v_idx := v_idx + 1;
     20    END LOOP;
     21    CLOSE upd;
     22    COMMIT;
     23  END;
     24  /
    
    Procedure created.
    
    SQL> exec test_coll;
    Frederick update to Shilpi
    Robert update to Sunil
    Jeremy update to Shreyas
    Simon update to Saral
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from supplier_16;
    
    CONTACT_N
    ---------
    Shilpi
    Sunil
    Shreyas
    Saral
    

    Of course, there is treatment rank by rank and is not best for performance, but it allows you to access your collection that you created names.

  • Find the minimum value in digital array that is greater than 0

    So far I have;

    $pfpp = min ($pflist);

    $pflist is the array of digital values and contains about 0.

    I need to change to $pfpp = min ($pflist); to return the lowest number which is greater than zero.

    I am stuck, can anyone help?

    Thank you

    Change the values in the table so I can't sort them in ascending order.

    Of course you can.  Or you can copy the table into a temporary array.

    $temp = $pflist;

    sort ($temp, SORT_NUMERIC)

    foreach ($temp as $value) {}

    If $value > 0; $number = $value; break;

    }

    echo "entry of zero smaller in pflist is $number";

  • Using the value in the array to the variable of reference - need help

    Can someone tell me if this is possible in as3?

    I want to loop through an array and use the array value to refer to a variable.

    The installation program:
    (For illustration only. No real script)

    My MCs:
    triangle_mc
    square_mc

    Variables of placement:
    var triangle_mc_x = 160;
    var square_mc_x = 200;

    My table:
    [shape_array] (contains 'triangle_mc' and/or "square_mc")

    What I want to do:

    for each {(var: chaîne d'élément dans shape_array)}
    Item.x = Item + "_x";
    Item.y = 60;
    }

    It should do the same thing as:

    for each {(var: chaîne d'élément dans shape_array)}
    If (point == "triangle_mc") {}
    triangle_mc.x = triangle_mc_x;
    triangle_mc.y = 60;
    }
    If (point == 'square_mc') {}
    square_mc.x = square_mc_x;
    square_mc.y = 60;
    }
    }

    Thank you!

    I think what you are after...

    for each {(var: chaîne d'élément dans shape_array)}
    This [point] .x = this ["_x" + point];
    This point there = 60;
    }

    Although I have zero degrees of ease with this form of loop for... I was born and raised on the (I =?; I)

  • How to change the value of the array element by using the property node

    Hello all :)

    IM using a table in the drop-down list box. the size of the array is not fixed.

    I want property strings [] from the drop-down list box to enter text in selection, but since I placed it inside the table im unable to use this property.

    I used 'arrayelem' reference property and property node connected to it but got no strings [] in the selection.

    so is it possible that I can use property strings]


Maybe you are looking for

  • pilot missing hard drive

    Hi, I use ubuntu 12.04 LTS on my HP COMPAQ CQ 42-451TU notebook.now I want to remove ubuntu and install windows 7 during installation, I do not see any hard drive to install windows, instead he ask me to load HARD drive driver.i pressed a button load

  • Document in the queue of the printer won't delete, poster processing error

    I can't remove a document to the printer a stone. I can't use the printer that I can't get rid of this document. I tried to put off the printer then restart him. I tried to restart the computer, but the document remained in the stone? Help

  • Unable to connect with desktop remotely

    With Windows 7 Pro, try connecting to office having same exact OS W7 pro, both machines are new Dell XPS 8700 s. I get message failed to connect as another 1.2.3 off voltage, i.e., cables etc bad machine. Not true because I can connect to the office

  • Error 90 b when startup on computer laptop g62

    I recently did not use my computer for several days. I started it upward and then made a few hw and shut down. The next time I went to the Tower on I got and error 90 b. I already disassembled and cleaned the fan, but I still receive the message. The

  • iPhone Folio - refunds

    HelloI'm trying to figure out the best size to design the iphone to a folio version to. All the information that I find seem to be very old.There are now so many sizes of screen for iphone640 x 1136 (iphone 5/5s / CF / SE)750 x 1334 (iphone 6/6 s)108