elements of permutation in table 2d

I'm looking for a way to replace a length defined by the user of the elements in an array to 2 dimensions between rows. All my efforts so far only take items and move them to the same line.

Basically, I have a chart 2d with 2 lines and I want to take some elements of one and put them in the other, getting a new array that has elements of both. It must be extensible to any number of lines.

Thanks for your help.

ADrexelDragon wrote:

Like this... Simple.

The OP required the ability to increase to additional lines.

This example moves row data down by "Shift".

Tags: NI Software

Similar Questions

  • Add multiple attributes to the element via the conversion table?

    Hello...

    I'm sure I know the answer to this question, but am looking for validation.

    Is it possible to add multiple values of the attribute to an element using a conversion table? Table following conversion creates the < some-elem > element with the attribute @attrname to "attrval"... but what happens if I wanted to put two attributes? I tried this... Some-elem [attrname = "attrval"] [otherattrname = "attrval2"]... but the second definition is ignored. Is it possible to do (with conversion tables)?

    Wrap this object This element of With this qualifier
    P: some-para-tagSome-elem [attrname = "attrval"]



    Thank you!

    .. .Scott

    Scott,

    The structured reference apps said to separate assignments of two attribute with an ampersand, as in

    Some-elem [atttrname = "attrval" & otherattrname = "attrval2"]

    I've never done, so it is not tested.

    Van

  • How to view the last element in a dynamic table 1 d

    Hello..

    I want to display the value of the last element in a dynamic array 1 d... / I mean... If I stop the vi race, I need to display the last element of the array... How can I do this?

    and is it possible to use a button to start the vi... instead of using the Run button on the face before of the vi?

    An array of index!.  Size of table allows to determine the size of your array, subtract 1, that feed into the terminal array of Index index.

    You start the VI running somehow.  It can be assigned to run when opening.  Assuming that what you want is a way to type values in a front panel, press a GO button you created on the front panel, then have the real part of the VI to run.  You can use a structure of the event.  Or put a while loop at the beginning with a small wait next statement which basically just asks the GO button.  When you press this button, the Boolean value true stops the whole loop and allows the program to move on the main body of your program.

  • Determine which cluster and the array index element was clicked on table clusters

    Hello

    I'm overload of brain with dynamic events and references and nodes of property etc.

    I am trying to identify the cluster and the array index element that was clicked on table clusters

    This gives me the name of the element:

    Is this reasonable?  How can I get the index?

    Thank you

    Paul

    Hello

    Download the VI in this link (also attached).  It gives you the index of the array element that you clicked. Hope this will help you.

    Kind regards
    Nitz

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

  • Get elements of the other table

    Hi all

    I have a table with a few lines like:

    create the table myTABLE

    (number of myID,

    VARCHAR2 (20) itemID.

    fieldA varchar2 (10),

    fieldB varchar2 (10),

    fieldC varchar2 (10)

    );

    I have a query that contains the itemID as

    Select c.myID, c.itemID, c.sourceA, a.sourceDescA, b.sourceDescB

    Cuttable c

    Join the tableA an a.myID on c.myID =

    Join tableB b on b.myID = c.myID and b.sourceID = a.sourceID

    What is the effective way for the description of the elements of the query based on itemID from myTable? Keep the same number of rows in myTABLE

    myTABLE.myID, myTABLE.itemID, myTABLE.fieldA, myTABLE.fieldB, myTABLE.fieldC, query.sourceA, query.sourceDescA, query.sourceDescB

    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0

    Thank you

    Hello

    user9542267 wrote:

    ...

    How can I choose the first itemID if I have two itemID with a different description than my new sample data.

    Remember, the rows of a table are not in any particular order.  If you talk about the 'first' line, you must clearly indicate what means 'first' to you.

    Do you really need to take the first itemID?   And the problem is really two itemIDs with a different description.  Don't expect different itemIDs for different descriptions?

    It seems that the problem occurs when 1 (not 2) itemID has different descriptions, and you want to choose only 1 line by itemID, regardless if this itemID is 1st, 2nd 3rd or Nth itemID.  For example, in the sample data you posted in response #8, there are 2 distinct values for source (and sourceDescB and sourceDescC, but the problem would be the same if any 1 of them were only different) who have itemID = '23'.  I don't know if consider you "23" to be the itemID 1st or 2nd, but I don't think it really matters.  It seems to me that the problem would be the same if "24 K" was considered the first itemID or if 'F25' was.

    Here's a way to ensure that you get only the 'first' line each Itemid of sourceTABLE, where "first" means in order by sourceID:

    WITH source_with_r_num AS

    (

    SELECT itemID, source, sourceDescA, sourceDescB

    ROW_NUMBER () OVER (PARTITION BY itemID

    ORDER BY ID source

    ) AS r_num

    FROM sourceTABLE

    )

    SELECT m.myID, m.itemID, m.fieldA, m.fieldB, m.fieldC

    s.sourceA, s.sourceDescA, s.sourceDescB

    MYTABLE m

    JOIN source_with_r_num s ON s.itemID = m.itemID

    WHERE r_num = 1

    ORDER BY m.myID

    ;

    Results of the sample data in the #8 response:

    MYID ITEMID FIELDA, FIELDB, FIELDC SOURCE SOURCEDESC SOURCEDESC

    ----- -------- ------ ------ ------ ---------- ---------- ----------

    1 23 an ABC AB 23 Source 23 Desc has 23 B Desc

    2 24K B BC BCD 24K Source 24K Desc has 24K Desc B

    3 F25 C CD CRC Source Desc F25 F25 F25 Desc B

    If there is a tie for the 'first' line for a given itemID, ROW_NUMBER arbitrarily call one of them 'first '.  If this isn't what you want (that is, if it is important which one is selected), you can add playoff expressions in the ORDER BY clause analytical ROW_NUMBER.

  • order of the elements in the nested tables

    In PL/SQL when I add item to a nested table of objects one by one (in order), and then try to insert that litter table type to a physical table, the change element order. How can I avoid this behavior?

    When you use the columns collection or object tables, nested tables are not guaranteed to hold the control element. varraying arrays (varrays), however, are.

    Also note that if you use the view object (or with columns in the collection), your SQL view materializes the collection and you can return any desired way (whether or not it is classified).

    I hope this helps...

    Gerard

  • Keep the order of the elements stored in the table pl.sql

    Hello friends,

    I'm having a type registration and for each item in the folder, I'll have the corresponding table of pl.sql type.

    If I store the values in the records in a query and also the individual elements in the table of pl.sql type will be of the order of the data is stored as it is. ..

    for example...

    in a record type, the data is stored as (name1, years1, salary1), (name2, age2, salary2)

    If I store in correspondent pl sql table type name1, name2
    years1, age2
    salary1, salary2

    I can identify the index of the record type with that of type pl/sql table...

    pls advice

    Thank you/kumar

    Kumar,

    Yes, the order of the elements will be the same.

    No specific reason why you want to create a collection for each attribute of the record?
    You can also declare another variable of the same file and initialize it.

    Some other suggestions for your code:

    (1) FOR 2nd loop can be changed to accommodate the request of the first slider he - by eliminating an extra iteration.

    SELECT MINC.FAMID,
                         MINC.MEMBNO,
                         MEMB.AGE,
                         SALARYX,
                         SALARYBX,
                         NONFARMX,
                         NONFRMBX,
                         FARMINCX,
                         FRMINCBX,
                         CU_CODE
                    FROM MINC, MEMB, FMLY
                   WHERE MINC.FAMID = MEMB.FAMID
                     AND MINC.MEMBNO = MEMB.MEMBNO
                     AND MINC.FAMID = FMLY.FAMID
                     AND MEMB.FAMID = FMLY.FAMID
                   ORDER BY MINC.FAMID
    

    (2) the collections can alternatively be initialized as follows:

       v_member_rec(v_member_rec.last).FAMID := j.FAMID;
       max_earnings_tab(max_earnings_tab.last) := v_max_earnings;
    

    The I tried the example for confirmation below...

    declare
     type emp_rec is record
     (name emp.ename%TYPE,
      dept emp.edept%TYPE,
      sal  emp.esal%TYPE
     );
    
     TYPE emp_rec_tab is table of emp_rec;
     ert emp_rec_tab := emp_rec_tab();
    
     TYPE ename_tab is table of varchar2(20);
     ent  ename_tab := ename_tab();
    
     TYPE edept_tab is table of number;
     edt  edept_tab := edept_tab();
    begin
     for i in (select * from emp)
     loop
         ert.extend;
         ent.extend;
         edt.extend;
    
         ert(ert.last).name := i.ename;
         ert(ert.last).dept := i.edept;
         ert(ert.last).sal := i.esal;
    
         ent(ent.last) := i.ename;
         edt(edt.last) := i.edept;
     end loop;
    
     for i in 1..ert.count
     loop
         dbms_output.put_line(ert(i).name||','||ent(i));
         dbms_output.put_line(ert(i).dept||','||edt(i));
         dbms_output.put_line('');
     end loop;
    end;
    
  • elements of permutation ring photo

    I can't understand something. I design a ring photo with three symbols for imitate a manual valve with 3 States (open, closed, unknown state). I dropped the 3 photos required via the Clipboard. I realized that the order was not good, so I wanted to reorganize the three photos. I don't see this option. Is this a bug? I expect such an obvious feature of a ring of photo... (LV 2015)

    I miss something here?

    Hello

    Ring photo does not allow the reorganization of elements.

    You can check the following link, which is for ring of text & photo, but the same applies to the ring of the photo.

    http://digital.NI.com/public.nsf/allkb/ABB59A1A4AFCBE56862579D700520A08

    Thank you

    AREV

    CTO | RAFA solutions

  • count of the elements of another frequency table

    Hello

    I'm new to apex oracle so patient with me

    I'm counting the number of items in the other table using primary key (in this case the ID) for example:

    Inventory of the table:

    IDFRUITLOCATION

    1

    AppleWE
    2ORANGEUK
    3MANGOGermany
    1AppleUK
    1Apple

    UK

    Summary table

    ID
    FRUIT
    QUANTITY
    1Apple3
    2ORANGE1
    3MANGO1

    So basically I want to get quantity table in the summary table based on the inventory data, I thought to change the Source of the region by using apex_item.text, but it is not working properly. And I think that there are some restrictions in the source of the region on the query syntax as well since I can't use the count() function on the SELECT part, or using the loop, ideas?

    Simply create a second region of report based on a query, we gave you. Do not base a report on a table, you can create a report based on a query.


  • Generate the XML file with elements and attributes in table Oracle

    Hello

    I have the following table structure.

    CREATE TABLE SPOOL
    (
    COIL_ID NUMBER (10),
    COIL_NUMBER VARCHAR2 (40),
    COIL_PO_OPERATING_UNIT VARCHAR2 (20).
    COIL_PO_NUMBER VARCHAR2 (40),
    MILL_NUMBER VARCHAR2 (2),
    MILL_COIL_STATUS VARCHAR2 (15).
    ITEM_NUMBER VARCHAR2 (40),
    COIL_WEIGHT NUMBER (38),
    WEIGHT_UOM VARCHAR2 (10),
    DOCUMENT_NUMBER VARCHAR2 (40),
    DATE OF DOCUMENT_DATE,
    DOCUMENT_STATUS VARCHAR2 (15).
    DOCUMENT_TYPE VARCHAR2 (20).
    DOCUMENT_SOURCE VARCHAR2 (20).
    TEST_ID NUMBER (38),
    NUMBER VALUE,
    TEST_UOM VARCHAR2 (20).
    TEST_STATUS VARCHAR2 (70).
    TESTER_LOGIN VARCHAR2 (20).
    EQUIPMENT_CODE VARCHAR2 (50).
    DOC_STS_MSG VARCHAR2 (600)
    )
    /
    For each record COILID, there could be several folders baased on TEST_ID/VALUE/TEST_UOM etc.

    And I would like to prepare the xml file in the following format by selecting data in the COIL?


    <? XML version = "1.0"? >
    -coil xsi: noNamespaceSchemaLocation = "www.tempel.com/COIL.xsd" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb = "http://xmlns.oracle.com/xdb" >
    < CoilId > 1419532 < / CoilId >
    < CoilNo > D2221050010A0 < / CoilNo >
    Changzhou < CoilPOOperatingUnit > < / CoilPOOperatingUnit >
    < CoilPONo > 4619 < / CoilPONo >
    < MillNo > 86 < / MillNo >
    Test of < MillCoilStatus > < / MillCoilStatus >
    C5 050FP800 < ItemNo > < / ItemNo >
    < weight > 7076 < / weight >
    KILOGRAM of < GLU > < / UDM >
    < DocumentNo > 0 < / DocumentNo >
    < DocumentDate > 2013 - 01 - 11 < / DocumentDate >
    < DocumentStatus > not < / DocumentStatus >
    < DocumentType > test < / DocumentType >
    CHIGMA1 < DocumentSource > < / DocumentSource >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4992" TestUnit = "mm" Status = 'NonProcessed' TestId = "135" / >
    < test DocStsMsg = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.0128" TestUnit = "mm" Status = 'NonProcessed' TestId = "124" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "12" TestUnit = "mm" Status = 'NonProcessed' TestId = "125" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5095" TestUnit = "mm" Status = 'NonProcessed' TestId = "127" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5042" TestUnit = "mm" Status = 'NonProcessed' TestId = "128" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5058" TestUnit = "mm" Status = 'NonProcessed' TestId = "129" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4967" TestUnit = "mm" Status = 'NonProcessed' TestId = "130" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5049" TestUnit = "mm" Status = 'NonProcessed' TestId = "131" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4972" TestUnit = "mm" Status = 'NonProcessed' TestId = "132" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4960" TestUnit = "mm" Status = 'NonProcessed' TestId = "133" / >
    < DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4996" TestUnit = "mm" Status = 'NonProcessed' TestId = "134" / >
    < / reel >

    Can you please guide me how to do it in a single query?

    Thanks in advance.

    Function EXTRACT will force a print in your version:

    SELECT XMLElement("Coil",
             XMLAttributes(
               'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
             , 'www.tempel.com/COIL.xsd' as "xsi:noNamespaceSchemaLocation"
             )
           , XMLForest(
               COIL_ID                as "CoilId"
             , COIL_NUMBER            as "CoilNo"
             , COIL_PO_OPERATING_UNIT as "CoilPOOperatingUnit"
             , COIL_PO_NUMBER         as "CoilPONo"
             , MILL_NUMBER            as "MillNo"
             , MILL_COIL_STATUS       as "MillCoilStatus"
             , ITEM_NUMBER            as "ItemNo"
             , COIL_WEIGHT            as "Weight"
             , WEIGHT_UOM             as "UOM"
             , DOCUMENT_NUMBER        as "DocumentNo"
             , DOCUMENT_DATE          as "DocumentDate"
             , DOCUMENT_STATUS        as "DocumentStatus"
             , DOCUMENT_TYPE          as "DocumentType"
             , DOCUMENT_SOURCE        as "DocumentSource"
             )
           , XMLAgg(
               XMLElement("Tests",
                 XMLAttributes(
                   DOC_STS_MSG    as "DocStsMsg"
                 , EQUIPMENT_CODE as "EquipmentCode"
                 , TESTER_LOGIN   as "TesterLogin"
                 , VALUE          as "Value"
                 , TEST_UOM       as "TestUnit"
                 , TEST_STATUS    as "Status"
                 , TEST_ID        as "TestId"
                 )
               )
             )
           ).extract('/*')
    FROM coil
    GROUP BY COIL_ID
           , COIL_NUMBER
           , COIL_PO_OPERATING_UNIT
           , COIL_PO_NUMBER
           , MILL_NUMBER
           , MILL_COIL_STATUS
           , ITEM_NUMBER
           , COIL_WEIGHT
           , WEIGHT_UOM
           , DOCUMENT_NUMBER
           , DOCUMENT_DATE
           , DOCUMENT_STATUS
           , DOCUMENT_TYPE
           , DOCUMENT_SOURCE ;
    
  • Question about the definition of a table null vs defining each element null in the table and the recording of memory.

    Hello

    I try to avoid any kind of memory leaks or problems of garbage collection.

    public class test {}

    var anArray:Array;

    .

    .

    .

    public void addObjects() {}

    anArray = new Array();

    anArray [0] = new Something();

    anArray [1] = new Something();

    anArray [2] = new Something();

    for (var i: int = 0; i < anArray.length) {}

    anArray [i] .addEventListener (MouseEvent.CLICK, doSomething);
    addChild (anArray [i]);

    }

    }

    private void doSomething(event:MouseEvent) {}

    for (var i: int = 0; i < anArray.length; i ++) {}

    anArray [i] .removeEventListener (MouseEvent.CLICK, doSomething);

    removeChild (anArray [i]);


    }


    anArray = null;


    }


    }

    Is it effective or should I register "anArray [i] = null" after 'removeChild (anArray [i])' in the loop of my doSomething(event:MouseEvent) function?


    Sorry if my question is confusing and I thank you in advance.

    If there is no other reference to new Something() instances, other elements of the array, removing (or assignment a = []) should work.

  • How to write the table 2d 2D table of cluster of 2 elements

    I want to write table 2D and a string in a 2D cluster table having two different elements. an element is of numeric type for 2d and another element of the string table. Please help me on this problem

    Hello

    You can do the following. A Vi with control is also attached.

    And about the insertion of a string and digital in the 2d table, I don't think that you can do. A table can only use a data type. You can use the clusters for the holding of different data types.

    Kind regards

    Amine31

    (Give congratulations to good answers and Mark as a Solution If your problem is resolved)

  • Obtaining of row and column of a table element

    Hello

    I have a table of 24 rows and column 24 giving me a total of 576 items. How can I get the row and column of a particular element in a table in LabView. For example if I write to item 127 How can I get the column and line item 127 is located.

    Kind regards

    Bastien

    Hi Marion,.

    Maybe just need to find the right "address" element in your 2D table?

    Use something like this:

    Maybe you have to out of line & column according to your numbering scheme...

  • Table of elements - multidimensional arrays

    Need:

    I need a multidimensional array that I want to use through several workflow.

    Detail:

    The information for each of the 10 + child tables are attributes of static information of VC:objects as VC:sdkconnection, VC:DatacenterFolder, VC:NetworkFolder, VC:Datacenter, etc.

    Direction:

    My idea was to create a configuration for each of the table element.  Then, create a Parent Configuration element with an attribute type of elements in the Configuration table.  To test this I wanted to make one for each loop through the array of items.

    System.log("Total Number of array objects: " + ParentElement.length);
    for(var i=0; i<ParentElement.length; i++){
      System.log("Total Number of array objects name " + ParentElement[i].name);
      System.log("Total Number of array objects: " + ParentElement[i].length) 
    }
    

    I managed to print the names of the child element objects.

    I have been unsuccessful in obtaining listing attributes in the child objects.

    in the above code ParentElement [i] .length is undefined.

    Advice/guidance is appreciated.

    Even if your solution does not work, it gives me a new direction.  And ultimately a solution.  Without identifying each brick on the yellow brick road, here's what I came with.

    1. I moved all configuration items in a folder to create a category

    2 pulled all the elements (previous method began with an attribute of the element to set up an array of elements).

    3. by looping through the items looking for a match in the entry workflow a string to index into the items attribute

    4. once found populate the output of the workflow with the objects identified in this configuration item.

    It was exactly what I was looking for when I started this thread, but it gives me a dynamic solution for future growth.  If I need to extend my environment, I can do this simply by adding another element of configuration category and revisits not 100s of workflows.

    Thank you for your quick response, the expertise and the entrance.

    var class = Server.getConfigurationElementCategoryWithPath (categoryPath);

    If (category == null) {}

    throw "CI" "" + categoryPath + "' not found!";

    }

    var category.configurationElements = items;

    for (i = 0; i< elements.length;="" i++)="">

    If (elements [i] .name! = null) {}

    var attribute is elements [i] .getAttributeWithKey ("indexCode");.

    indexCode = attribute.value;

    If (attribute! = null) {}

    If (attribute.value == inputCode) {}

    attribute = elements [i] .getAttributeWithKey ("vc_sdk");

    vc_sdk = attribute.value;

    attribute = elements [i] .getAttributeWithKey ("vc_Datacenter");

    vc_Datacenter = attribute.value;

    attribute = elements [i] .getAttributeWithKey ("vc_hostsFolder");

    vc_hostsFolder = attribute.value;

    attribute = elements [i] .getAttributeWithKey ("vc_NetworkFolder");

    vc_NetworkFolder = attribute.value;

    attribute = elements [i] .getAttributeWithKey ("vc_DatastoreFolder");

    vc_DatastoreFolder = attribute.value;

    break;

    }

    }

    }

  • Display the values of the Page element in HTML table

    Hi all

    could you please help me with the below? I want to have a table in the HTML area and to display in the table of elements of the Page of the page.

    I got the code like this:
    {
    < table >
    < tr > < td > & P1_ECEMEA_ASSISTANCE < table > < /tr >
    < tr > < td > & P1_ECEMEA_WIP < table > < /tr >
    < /table >
    }
    It shows the element of the Page names in the form of text, not the values.

    However, this code without the tags table:
    {
    ECEMEA request for Assistance of the CQT: & P1_ECEMEA_ASSISTANCE.
    ECEMEA CQT Work in Progress: & P1_ECEMEA_WIP.
    }
    Works and Page element values are displayed.

    Is it possible to display the values of the Page element in the HTML table at all or should I use a different method to show the values in a table? The above is only an excerpt of the code. I need to display about 30 items in Page, put in shape in a table with headers.

    Please let me know what kind of region is the best to use, or if I have to use only a few symbols of escape in the table code...

    Thank you and best regards,

    Vladimir

    Vladimir,

    Looks like you're missing the period after the substitution variables.

    {
    
    &P1_ECEMEA_ASSISTANCE.
    &P1_ECEMEA_WIP.
    }

    -D.

Maybe you are looking for