Read the data in the first column selected in a multicolumn listbox

When a line is selected in a ListBox multicolumn (1 point), how can I go on reading the data in the first column?

The listbox multicolumn itself is the digital picture data type. If you have allowed only 1 point selection and selection mode select any row, it returns the line number. The property node 'Element names' to return a table 2d-chains of the elements in your Inbox. The index of the row to the value of the listbox and column 0. See code attached.

Tags: NI Software

Similar Questions

  • How to read the two columns of data from the Port series

    Hello

    I'm reading two columns of data from the serial port.

    Example:

    52439 52430

    52440 52437

    52209 52214

    51065 51070

    52206 52390

    I use the serial of Visa service and I can read the first column of data from the serial port, but I can't understand how to read the second column.

    I want to both sets of chart data.

    I enclose my VI.

    Thank you for your help.

    The analysis of string function takes a "Format string" on top (with the right button of the function and choose Help, which explains all the entries).  In particular, you can say 'Give me two numbers separated by a tab' and the output will be two numbers (whole or floating, depending on the chosen format).  In particular, %d\t%d specifies a decimal integer, , whole decimal.

  • How remove the line by line by comparing to the first column?

    Hello!

    I have a problem - I need to remove the line by line, but the problem is, I know that the first COLUMN of the table is a PK.
    To retrieve the NAME of the COLUMN that I use:

    SELECT column_name, table_name FROM USER_TAB_COLUMNS WHERE column_id = 1 and table_name = c1.tmp_table_name;
    But it does not somehow.
    Below you can see my script (which has not worked for now):

    declare
    XXX varchar2 (100);
    Start
    C1 in (select table_name, tmp_tables tmp_table_name) loop
    IMMEDIATE EXECUTION
    ' SELECT column_name in ' | xxx | "USER_TAB_COLUMNS WHERE column_id = 1 AND table_name = ' |" ' || C1.tmp_table_name | " ' ;
    immediate execution
    "start."
    for c2 in (select * from ' | c1.tmp_table_name | start loop ')
    Insert into ' | C1.table_name | "values c2; delete from ' | C1.tmp_table_name | 'where ' | xxx |' = c2.' | xxx |'; exception: when other then null; end; end loop; end;';
    end loop;
    end;

    P.S. The Inserts work perfect. I have a problem with deleting lines that are in c1.table_name, of c1.tmp_table_name (the two tables have the same structure, PK, always), because I have the names of columns different another tables which are PK. (for example: K, ID, NS and so on) Please help me to write the correct script.
    For example this will be for the first line recovered as:
    Start
    C1 in (select table_name, tmp_tables tmp_table_name) loop
    immediate execution
    «Start for c2 in (select * from ' |)» C1.tmp_table_name | Start loop ')
    Insert into ' | C1.table_name | "values c2; delete from ' | C1.tmp_table_name: ' where K = c2. K; exception: when other then null; end; end loop; end;';
    end loop;
    end;
    This script works perfectly. But I have many other tables with different PK - K No.

    Solution with the logging of errors table

    -- create the error-logging table
    CREATE TABLE tbl_MergeErrors (
        Stamp       TIMESTAMP(3),
        TableName   VARCHAR2(30),
        KeyColumn   VARCHAR2(30),
        KeyValue    VARCHAR2(4000),
        ErrorCode   NUMBER(5),
        ErrorMsg    VARCHAR2(4000),
    
      CONSTRAINT pk_MergeErrors
          PRIMARY KEY (TableName, Stamp)
          USING INDEX
    )
    /
    
    -- procedure to insert errors
    CREATE OR REPLACE
    PROCEDURE LogMergeError (pTableName  IN VARCHAR2,
                             pKeyColumn  IN VARCHAR2,
                             pKeyValue   IN VARCHAR2)
    IS PRAGMA AUTONOMOUS_TRANSACTION;
    
        -- you couldn't insert SQLCODE or SQLERRM directly into a table (ORA-00984)
        nSQLCODE   NUMBER(5)      := SQLCODE;
        vcSQLERRM  VARCHAR2(4000) := SQLERRM;
    
    BEGIN
      INSERT INTO tbl_MergeErrors
             (Stamp, TableName, KeyColumn, KeyValue, ErrorCode, ErrorMsg)
          VALUES (SYSTIMESTAMP, RTrim( SubStr( pTableName, 1, 30)),
                  RTrim( SubStr( pKeyColumn, 1, 30)), SubStr( pKeyValue, 1, 4000),
                  nSQLCODE, vcSQLERRM);
      COMMIT WORK;
    
    -- if an error occured here, then just roll back the autonomous transaction
    EXCEPTION
      WHEN OTHERS THEN   ROLLBACK WORK;
    END LogMergeError;
    /
    
    -- create the tables and insert test-data
    CREATE TABLE TMP_TABLES (
        TABLE_NAME       VARCHAR2(200),
        TMP_TABLE_NAME   VARCHAR2(200),
      CONSTRAINT TMP_TABLES_X PRIMARY KEY (TABLE_NAME)
    )
    /
    CREATE TABLE TMP_KL002 (
        K   VARCHAR2(40),
        N   VARCHAR2(200)
    )
    /
    CREATE TABLE TMP_TABLE1 (
        NS   VARCHAR2(40),
        N    VARCHAR2(200)
    )
    /
    CREATE TABLE KL002 (
        K VARCHAR2(40),
        N VARCHAR2(200),
      CONSTRAINT PK_KL002 PRIMARY KEY (K)
    )
    /
    CREATE TABLE TABLE1 (
        NS   VARCHAR2(40),
        N    VARCHAR2(200),
      CONSTRAINT PK_TABLE1 PRIMARY KEY (NS)
    )
    / 
    
    INSERT INTO TMP_TABLES (TABLE_NAME, TMP_TABLE_NAME) VALUES ('kl002','tmp_kl002');
    INSERT INTO TMP_TABLES (TABLE_NAME, TMP_TABLE_NAME) VALUES ('table1','tmp_table1');
    INSERT INTO tmp_KL002 (K, N) VALUES ('00', 'none');
    INSERT INTO tmp_KL002 (K, N) VALUES ('07', 'exists');
    INSERT INTO tmp_KL002 (K, N) VALUES ('08', 'not assigned');
    INSERT INTO tmp_table1 (NS, N) VALUES ('2000', 'basic');
    INSERT INTO tmp_table1 (NS, N) VALUES ('3000', 'advanced');
    INSERT INTO tmp_table1 (NS, N) VALUES ('4000', 'custom');
    COMMIT WORK;
    
    -- to test, if it works correct when primary key values exists before
    INSERT INTO KL002 VALUES ('07', 'exists before');
    COMMIT WORK;
    
    -- check the data before execution
    SELECT * FROM TMP_KL002 ORDER BY K;
    SELECT * FROM KL002 ORDER BY K;
    SELECT * FROM TMP_TABLE1 ORDER BY NS;
    SELECT * FROM TABLE1 ORDER BY NS;
    
    -- empty the error-logging table
    TRUNCATE TABLE tbl_MergeErrors DROP STORAGE; 
    
    -- a solution
    DECLARE
    
        PLSQL_BLOCK  CONSTANT VARCHAR2(256) := '
    BEGIN
      FOR rec IN (SELECT * FROM <0>) LOOP
        BEGIN
          INSERT INTO <1> VALUES rec;
          DELETE FROM <0> t WHERE (t.<2> = rec.<2>);
        EXCEPTION
          WHEN OTHERS THEN
              LogMergeError( ''<1>'', ''<2>'', rec.<2>);
        END;
      END LOOP;
    END;';
    
    BEGIN
      FOR tabcol IN (SELECT t.Tmp_Table_Name, t.Table_Name, c.Column_Name
                     FROM Tmp_Tables t,
                          User_Tab_Columns c
                     WHERE     (c.Table_Name = Upper( t.Tmp_Table_Name))
                           AND (c.Column_ID = 1)
                ) LOOP
        EXECUTE IMMEDIATE Replace( Replace( Replace( PLSQL_BLOCK,
                                   '<0>', tabcol.Tmp_Table_Name),
                                   '<1>', tabcol.Table_Name),
                                   '<2>', tabcol.Column_Name);
      END LOOP;
    END;
    / 
    
    -- check the data after execution ...
    SELECT * FROM TMP_KL002 ORDER BY K;
    SELECT * FROM KL002 ORDER BY K;
    SELECT * FROM TMP_TABLE1 ORDER BY NS;
    SELECT * FROM TABLE1 ORDER BY NS;
    
    -- ... and also the error-logging table
    SELECT * FROM tbl_MergeErrors ORDER BY Stamp, TableName;
    
    -- of couse you must issue an COMMIT (the ROLLBACK is only for testing
    ROLLBACK WORK;
    
    -- drop the test-tables
    DROP TABLE TABLE1 PURGE;
    DROP TABLE KL002 PURGE;
    DROP TABLE TMP_TABLE1 PURGE;
    DROP TABLE TMP_KL002 PURGE;
    DROP TABLE TMP_TABLES PURGE;
    
    -- you shouldn't drop the error-logging table, but I use it to free up my db
    DROP TABLE tbl_MergeErrors PURGE;
    

    Greetings, Niels

  • reading the timestamp column in the txt file

    Hi pros labview

    I work with labview 8.6 for about 1 week and I need help in reading txt files.

    the textfiles that I read have 2-11 columns.

    the first column shows the time and others show different channels where I measured the voltages.

    It is therefore no problem with reading of the voltage-columns and put it on the y - axis to a chart of the vi but I can't the time on the x-axis column.

    I took the basic "read file.vi" and it has changed a little according to my needs.

    hope you can help me, getting time on the x-axis column. (perhaps with a xy chart?)

    the vi and I have to read txt file are attached...

    Here is an example. The formatting of the x axis relative time will now do something.

  • adding multiple files *.csv while retaining the original file name in the first column

    Hi guys Cela made some time.

    I am trying to add several *.csv files while retaining the original file name in the first column, the real data set is about 40 cases.

    file a.csv contains:
    1, line an a.csv
    2, line 2 in a.csv

    file b.csv contains:
    1, line a b.csv
    2, line 2 in b.csv

    result output.csv is:

    I would like this:
    a.csv, 1, the line in a.csv
    a.csv, 2, line 2 in a.csv
    b.csv, 1, the line in b.csv
    b.csv, 2, line 2 in b.csv

    Any suggestions to speed up my hobbling attempts would be aprieciated

    Thank you

    -SS

    What you could do is given in attachment.

    Started with 2 files:

    a.csv

    copy of a.csv

    Both with data:

  • Columns of folder: by default, how can return the first column 'Name' without having to move it manually every time?

    Something's happened awhile and when I create a folder which appears the first column is the column 'Date modified '. By default, how can return the first column 'Name' without having to move it manually every time?

    Hello

    I suggest you to visit these links and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-files-and-folders#section_4

    http://Windows.Microsoft.com/en-us/Windows-Vista/folders-frequently-asked-questions

    It will be useful.

  • checkbox in the first column of the reports

    Hi all
    I have a classic report where the first column is checkbox display.
    Instead of the box, can I have the radio button.
    If it is not possible,
    When a check box is selected, the others should not get selected.


    Please guide me to get it used.

    Thanks in advance
    Good bye
    Sonny_starck

    Hello Sonny_starck,

    Yes you can. Try this:

    SELECT APEX_ITEM.RADIOGROUP (1,deptno,'20',dname) dt, deptno, dname
    FROM   dept
    ORDER  BY 1
    

    Kind regards
    Roel

    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.Logica.com/

  • How better to insert a subarray (line) in a 2D array to the correct index which is based on the value of the first column

    Hello

    I would like to insert a subarray (line) in a 2D to the correct index table. The position is to say the index value depends on the value of the first column of the table 2d.

    As an examlple my 2d array would look like this

    230 50 215 255

    300 60 270 330

    360 20 350 370

    And I would like to insert another line (subarray) with the following values

    320 40 300 340

    This new line should be placed between the second and third rows (this is based on the first column only).

    I tried the threshold 1 d function table by taking an 1Dsub array of my 2d array (first column), then using the first of the new line (320) as the threshold. It sort of work, but it does not work when I start the table (IE there is only 1 row) and it seems to not work properly on other occasions (as explained in the help of Labview).

    Hopefully the explanation is clear enough for any suggestion. Thanks in advance for the help!

    JTRI wrote:

    The idea is I have start with a new table and add these lines in the right order every time that the user sets the values Jack

    Ahh, so try this.

    This will also work with an empty array.

    You want to do with this function it is a Subvi.

    Make the entries 'table' and 'subarray"on the connector, then 'new array' output.

    You can then put this Subvi in a loop with a registry to shift and it will help to add new lines in a sorted order, when they are added.

    That is what you were aiming for?

  • Photosmart Premium C309a print only the first column of the Excel worksheet

    Photosmart Premium C309a print only the first column of the Excel worksheet

    Hello

    I see you are having a problem printing to an Excel document.

    I suggest you install a default substitution such as the jet pilot desktop 990 c driver.

    You can follow this thread of Shane, who will show you how.

    After that, you can try printing again from Excel.

  • How the first column heading must be repeated if the table breaks across pages

    Hi Experts,

    RTF model, header row in the table automatically repeat if record go to the next page. in similar fasion, I want to repeat the first column heading, table breaks on any page.

    Please help reslove this issue...

    Hello

    You can add the tag to the first column and the first row of the table. It will repeat 1st column when table to break across pages.

    Here 1 means, repeat first column when table to break across pages.

    I hope this will solve your problem.

    P.S. If you provide 2, this means, repeat for column 2 of the table through the pages

    Please check the issue as resolved, if that answers your question. Thank you

  • I have 10 items.  I'm trying to update camera raw plug so it will read the first lines of a 7dmarkii shot. I can't find where to put them to update to the latest version of 8.7.  If someone could please point me in the right direction.  Thank you very muc

    I have 10 items.  I'm trying to update camera raw plug so it will read the first lines of a 7dmarkii shot. I can't find where to put them to update to the latest version of 8.7.  If someone could please point me in the right direction, I would really appreciate it!

    Normally, I shoot with the 7dmarki and have never had any problems.  After troubleshooting my error message 'cannot open IMG1111 because it's the wrong file type', only the options have been updated plugin raw from the camera, to buy the latest version or uninstall and reinstall.  First train to the plugin to update because it was a leased device.  Thanks again!

    Thanks MichelBParis!  I didn't see where he said to 12 items.  I downloaded the free DNG Converter last night and not had much luck.  It is not recognizing that I have all files in the folder at all.  Don't know what I'm doing wrong!

  • How to count the first column automatically.

    Dear all.

    I would like to calculate the first column from 1 to N, when the user clicks on the add a line button.

    Please refer to the following

    -------------------------------------- Code --------------------------------------

    var nNodes is Test_Result1.sub_Product_accessories. Config_Acc.resolveNodes ("Config_Acc [*]"). Length;


    If (nNodes < = 6) {}
    Test_Result1.sub_Product_accessories. Config_Acc.instanceManager.addInstance ();
    }

    AS-IS

    count.JPG

    AS IT WILL BE

    count2.JPG

    Javascript code the Initialize event of the AccNum field:

    this.rawValue = this.parent.index + 1

  • Change the first column seen in the datagrid by code?

    Hello

    Is anyway to change the first column in a DataGrid using action script? I mean, for example, think I have 10 columns, only 3 are seen (0,1,2). I just want to have a button to change the first column view. Thus, for example, if I press it, 1.2, and third column will be those that is displayed in the datagrid control. I need to emulate the same thing that the scroll bar when you drag in a datagrid, but instead of letting the scroll bar does that automatically, I want to "scroll" datagrid manually.

    Moreover, is anyway through datagrid children and hide the scrollbar manually?

    Thanks in advance,

    Aron.

    horizontalScrollPolicy

  • selection of the first column of the clicked row data

    All,

    Ive a report with a custom template and I want to return / select the first value in the column of the clicked folder, how can I get this data by using javascript code in DA or jquery?

    I did some research but couldn't do something similar.

    Classic report

    Apex 4.2

    Scott,

    I used the expression below, but it works only when the column ID/first appears, but if you set a column to not show IE uncheck the show of the column attribute, then it cannot read this value.

    $(this.triggeringElement) .find ('td:first').text())

    is there a way to always get that ID/first column when figure is not on the report?

    concerning

  • How to read the two columns of data in a file of PDM.

    Hi all

    I am reading two data columns for the 2nd of a PDM file two sheets, as shown below.

    Two columns of data must then be shared so they can be displayed in a xy chart and also apply a linear adjustment VI. I implemented the graph xy and linear adjustment using a txt file (see below), therefore all the outputs work, however this application with a tdms file turns a little more tax.

    So, essentially, that I don't know how read the correct leaf and therefore the columns in the PDM file and then how to produce the graph xy and linear adjustment of the data types produce. Here's my current attempt, which produces several errors of the type of terminal, as well as not being able to select the exact data in the PDM.

    Any help/suggestions/example vi on this asap would be greatly appreciated.

    Thanks in advance,

    Pete

    Also the PDM file viewer. VI helps you easily understand the structure of data files.

Maybe you are looking for