How to get the index of a pressed button in control array?

Greetings,
I have 3 parallel arrays--one containing buttons and the other two containing string indicators.  I'd like to be able to push a button and get the values in the other arrays.  How can this be done?
(P.S.  Illustrations are great and most welcome, but I do not have Labview on this computer, so I would appreciate it in jpg or screenshots if possible.)
Thank you!
Solved!
Go to Solution.

Here's what I had in mind. Modify as needed.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
ButtonArray.vi ‏14 KB
ButtonArray.png ‏11 KB

Similar Messages

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • How to get the index of a h:column element?

    Hi!
    I'd like to know how to get the index of a <h:column> element.
    Here is the code of what I'm trying to do:
    <h:column>
         <a:commandLink
              value="#{familyAction.familyDocsByPrj}"
              action="#{homeAction.search(ROW_INDEX)}"
              reRender="rightAppPanel" />
    </h:column>When clicking a row, I'd like to make a "search" depending on the selected row.
    Does anybode know how to do that?
    Thanks a lot :)

    Thanks a lot for all your answers! :)
    I finally got to do something with my little knowledge =P
    I created a new class containing all the data needed for the dataTable (including a "String id").
    And that's what I get:
    <h:column>
         <a:commandLink
              value="#{familyAction.familyDocsByPrj.name}"
              action="#{homeAction.search(familyAction.familydocsByPrj.id)}"
              reRender="rightAppPanel" />
    </h:column>

  • How to get the index of the word at current cursor position in the word?

    Dear All
    I am implementing a spell checker of my native language in Word. Whenever I run spell checker it start from the first word. How can I make it to start from the current cursor position? How can I get the index of the word at the current cursor position?
    Thanks in advance.
    Dharam Veer Sharma

    hi Dharam Veer Sharma,
    Thanks for sharing the solultion with us.
    It is helpful for others who have the same issue. And if you have any Office developing issue, please feel free to open a new thread.
    Have a nice day.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get the index of subform in dynamic Forms??

    We are creating a Dynamic Form in which there is a field "PAN number" in a block. With the Script, we are replicating the blocks. Suppose there are 10 blocks (hence 10 PAN number fields will be there) and if the user wants to enter the PAN number in any of the blocks, how can we get the index of the block on which a value has been entered?

    Are you sure you are using JTree? (I couldn't find a method named getIndex at all!)
    As I couldn't quite understand what you are getting at, one thing that would be helpful is if you refer to "How to use Trees" in The Java Tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

  • How to get the index of the minimize point

    Need to get the index of the minimize point, marked as red cycle in the attached word file.
    It is a collected data from different sample devices, so the curve may change a bit each time. But the overall profile is the same, just 2 main peaks.
    I tried to detect the Y difference to see when the difference values change from negative to positive.
    But, there are noise as tiny peak when zoom in, shown in word file. Then tried to use median filter to make it smooth. (Maybe better method should be used.)
    But there are still some bigger regional peak. Any suggestion?
    Is there any labview function or better algorithm can make it. Many thanks for your help.
    Solved!
    Go to Solution.
    Attachments:
    Curve shots(zoom in).doc ‏294 KB
    Sample Data 1.vi ‏22 KB
    Sample Data 2.vi ‏16 KB

    A trick I often use is to sample the data with a much higher speed than needed. Then I apply some simple averaging methods or and median filter. After that I downsample the signal to a adequate rate by averaging x samples. This have been a saver for me more than once. How successful it is depends of noise character type. It just a hint as it may not be applicable in your application 
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to get the index of a row in dynamically generated list

    Hi,
    I am displaying a list which contains 6 rows using <logic:iterator/>
    If i am changing a text value which is in 3 row, I want to pass that row index to the javascript function.
    I am using IndexId attribute of <logic:iterator> to get the index of a row,but
    It is working fine for Hyperlink buttons, but it is no working for text boxes.
    can any one plz help me..
    Thanks,
    madhu

    madhu,
    Please post your code... It's a bit like asking a mechanic to fix your car blind folded.

  • Coded UI -VSTS 2012 How to get the tab details from UITabContainerPane(UI Test Control)

    Hi Team,
    I am quite new to Coded UI. I am trying out the possibility of Coded UI for Spotfire Report Validations which is available in web portal. I have three tabs on my web page. How can get the list of tabs and act on each. In the recorded script i could see that
    under UITabContainerPane I can see the tab coming under UITabContainerPane(UITestControl). I am not sure from this parent how will i get the childs to get access to each tabs. Please advice.
    Thanks & Regards,
    Divya

    I tried the following code however when i do a quick watch on div i get a timeout.
    public partial class UIMap
            public void selectTab()
                HtmlDiv div = new HtmlDiv();
                div.SearchProperties[HtmlDiv.PropertyNames.Name] = "tab";
                HtmlControl controls = new HtmlControl();
                controls.SearchProperties.Add(HtmlControl.PropertyNames.Class, "singleTabContainer");
                UITestControlCollection collection = controls.FindMatchingControls();

  • How to get the index value from rich:dataTable in jsf2.0

    hi,
    I am developing web application using jsf2.0. In this case, I used rich:dataTable tag for display the values from mysql.
    so this is working..
    my problem is, How to select the perticular row or index from the datatable for another processing...
    help me..
    Thanks.

    Hi,
    You need to get the selectedIndex attribute of the drop down element, e.g.
    String ind = web
                   .element(
                        41,
                        "/web:window[@index='0' or @title='Our Business Web Site']/web:document[@index='4' or @name='optBody']/web:form[@name='frmOptions' or @index='0']/web:select[(@name='PathLen' or @index='2')]").getAttribute("selectedIndex");
    System.out.println("Drop down index is: " + ind);
    You can use the Object Browser to get the path to the element you are interested during recording.
    Regards,
    Jamie

  • Is there a way to find out how to get the index of a column?

    Hello,
    I want to know the index of a column for example the column at the first position in a jtable is 0 so how can i get this index?
    for example: the column called "surname" is index 0 but the user can move the column. So the name stays the same but the index of the column changed. I search for a method like
    table.getColumnIndex("surname");

    I think it really depends on what the OP is trying to do. I think the program
    below offers up the possible choices pretty well.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableColumnIndexDemo extends JFrame {
         private JTable table;
         private String[] names = new String[]{ "One", "Two", "Three", "Four", "Five" };
         public static void main( String args[] ) {
              SwingUtilities.invokeLater( new Runnable() {
                   public void run() { new TableColumnIndexDemo(); }
         public TableColumnIndexDemo() {
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              DefaultTableModel model = new DefaultTableModel( names, 1 );
              table = new JTable( model );
              JButton button = new JButton( "Print indices" );
              button.addActionListener( new ActionListener() {
                   public void actionPerformed( ActionEvent e ) {
                        printIndices();
              getContentPane().setLayout( new BorderLayout() );
              getContentPane().add( button, BorderLayout.NORTH );
              getContentPane().add( new JScrollPane( table ), BorderLayout.CENTER );
              getContentPane().add( new JLabel( "Move columns around then print indices" ), BorderLayout.SOUTH );
              setSize( 300, 150 );
              setVisible( true );
              printIndices();
         private void printIndices() {
              TableColumnModel columnModel = table.getColumnModel();
              TableModel model = table.getModel();
              StringBuffer sb = new StringBuffer();
              System.out.println( "Visible order");
              for ( int k = 0; k < columnModel.getColumnCount(); k++ ) {
                   if ( k > 0 ) sb.append( ", " );
                   sb.append( k ).append( " " ).append( columnModel.getColumn( k ).getIdentifier() );
              System.out.println( sb );
              sb = new StringBuffer();
              System.out.println( "By name using getColumnIndex(TableModel,name)" );
              for( int k = 0; k < names.length; k++) {
                   if ( k > 0 ) sb.append( ", " );
                   sb.append( getColumnIndex( model, names[k] ) ).append( " " ).append( names[k] );
              System.out.println( sb );
              sb = new StringBuffer();
              System.out.println( "By name using columnModel.getColumnIndex(name)" );
              for( int k = 0; k < names.length; k++) {
                   if ( k > 0 ) sb.append( ", " );
                   sb.append( columnModel.getColumnIndex( names[k] ) ).append( " " ).append( names[k] );
              System.out.println( sb );
              sb = new StringBuffer();
              System.out.println( "Model index by visible order");
              for ( int k = 0; k < columnModel.getColumnCount(); k++ ) {
                   if ( k > 0 ) sb.append( ", " );
                   TableColumn column = columnModel.getColumn( k );
                   sb.append( column.getModelIndex() ).append( " " ).append( column.getIdentifier() );
              System.out.println( sb );
         public static int getColumnIndex(TableModel model, String name) {
             for(int i = 0; i < model.getColumnCount(); i++) {
                 if( model.getColumnName(i).equalsIgnoreCase(name) ) {
                     return i;
             return -1;
    }

  • How to get the index of table row without selection?

    Hi all,
    I have an table designed in XML view.Now i have added an change method for qty cell "valqty". When user inputs the qty in the cell and press enter this method is triggered now I want to know which index of the table is currently edited.Through which i can get the value of other cell in the same row.
    NOTE: The table row doesn't have selection either multiple or single
    I tried the following inside the valqty method but it now working
    this.getValue();
    this.getBindingContext().getProperty('PRD_NUM');
    <Table id="idProductsTable"
    inset="false"
    items="{oModel>/deliverylist}"
    visibleRowCount= "7"
    mode="MultiSelect"
    modeAnimationOn="true">
    <headerToolbar>
    <Toolbar>
    <Label text="Products"></Label>
    </Toolbar>
    </headerToolbar>
    <columns>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Order" />
    </Column>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Quantity" />
    </Column>
    </columns>
    <items>
    <ColumnListItem>
    <cells>
    <Text text="{oModel>PRD_NUM}" />
    <Input value="{oModel>DEL_QUAN}" change="valqty" maxLength="13"  />
    </cells>
    </ColumnListItem>
    </items>
    </Table>
    Thanks

    Thanks Robin,
    But in my case oEvent.getSource() is returning the cell instance and
    oEvent.getSource().getBindingContext() is undefined
    Hence not getting the value
    I also tried the following
    oEvent.getSource().getParent().getParent().indexOfItem()
    But index returned is -1

  • How to get the index of the error record when uploaded using standard LSMW

    Hi Experts,
    When uploading data using lsmw standard batch input method which creates an error session if any errors,how can we able to find the index of the error record
    eg: If 3rd record in input file is incorrect then error session is getting created with the error and index as 1.But I want to know that 3rd record in my input file is incorrect.
    Please help me out.

    Srinivas,
    In global data, i've written like this.
    TYPES: BEGIN OF TYPE_ERROR,
                 INDEX TYPE I,
                 END OF TYPE_ERROR.
    DATA: GT_ERROR TYPE TABLE OF TYPE_ERROR,
               GS_ERROR TYPE TYPE_ERROR,
               GV_TOTAL_COUNT TYPE I, GV_INDEX TYPE I,
               GV_STRING TYPE STRING,
              GV_FILE TYPE STRING VALUE '/usr/sap/interfaces/LSMW/Asseterror
    In Begin of transaction,
    GV_TOTAL_COUNT = GV_TOTAL_COUNT + 1.
    In End of processing,
    OPEN DATASET GV_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC = 0.
    CLEAR GS_ERROR.
    LOOP AT GT_ERROR INTO GS_ERROR.
    CONCATENATE 'INDEX OF THE ERROR RECORD IS:' GS_ERROR INTO GV_STRING.
    TRANSFER GV_STRING TO GV_FILE.
    CLEAR: GV_STRING, GS_ERROR.
    ENDLOOP.
    ENDIF.
    How and where will I be assigning error count and append it to the internal table.
    Please help me out.

  • How to get the index of the clicked button on TOOLBARBUTTONCHOICE

    Hello Experts,
       I have used toolbarbuttonchoice and created the dropdown list of the buttons dynamically. now when any of the button is clicked i need to get the reference of the button to call appropriate code in the action, but i am unable to get the either the reference or index of the clicked button.
    Please help.
    Regards,
    Kinshuk

    Hi Sascha,
      My code goes this way
      data:
        lr_btn_ch   type ref to if_wd_view_element,
        lr_toolbar_btn_choice type ref to cl_wd_toolbar_btn_choice,
        lr_row_data           type ref to cl_wd_row_data,
        item                  type string,
        action                type string.
    CALL METHOD view->get_element
      EXPORTING
        id      = 'BTNCH'   " button choice Element in layout
      receiving
        element = lr_btn_ch
    lr_toolbar_btn_choice ?= lr_btn_ch.
    DATA:  lt_items      type string_table,
        lt_actions    type string_table.
    loop at lt_dyntab into ls_dyntab.
      append ls_dyntab-name to lt_items.
    append 'ONBTNCH' to lt_actions.
    endloop. 
    i get the data in the table lt_dyntab from API not in context
      loop at Lt_items into item.
        read table Lt_actions index sy-tabix into action.
        create_choice_item( i_toolbar_btn_choice = lr_toolbar_btn_choice i_item = item i_action = action i_view = VIEW ).
      endloop.
    create_choice_item creates the menu item for the button choice..
    My question is where should i call the map_on_action method. and how do i retrieve the index or reference in ONBTNCH method.
    please elaborate.
    Regards,
    Kinshuk

  • How to get the index of a Column

    Hello,
    I want to know the index of a column for example the column at the first position in a jtable is 0 so how can i get this index?
    for example: the column called "surname" is index 0 but the user can move the column. So the name stays the same but the index of the column changed. I search for a method like
    table.getColumnIndex("surname");

    So why do you post questions on multiple forums.
    Like I said you are wasting peoples time. We don't know what has been suggested on the other forums. So by answering the question here we are wasting our time because you also probably got the answer on the other forum as well.

  • How to get the index of framed color box control in 2 D framed color box array

    Hi,
    In project, I want to show the different status (Std By, TIP, Pass & Fail) with different color for 200 color boxes arranged in 20X10 (2 D array). When user click on any of the array item, I want to show the details, so I want the index of the item. How can I get it?
    Thanks,
    Shrinivas
    Solved!
    Go to Solution.

    Why an array? There's more than one way to skin a cat 
    See attached
    "In theory, theory and practice are the same. In practice, they’re not."
    Attachments:
    CatSkinned.vi ‏19 KB

Maybe you are looking for

  • HP J6410 all in one wireless printer will not print

    Use windows 7 on my HP laptop and windows vista on my HP desktop  J6410 printer continually fails and error message says printer offline  works great with desktop and only fails when using laptop It therefore is only failing to communicate with lapto

  • ICloud WINDOWS 7 64 Bit sync problem with calendar of Outlook 2010

    I am using iPhone 4S (IOS5) iPad 1 (IOS5) PC (WINDOS 7 SR1 32 bit, Cor-2-duo) & Outlook 2010, 32 bit, at home PC (WINDOWS 7 SR1 64 bit, Intel i7) &  Outlook 2010 version 14.0.6106.5005 (32-Bit), in my office together with iCoud for syncing my contact

  • How to set up syncing pages band iMac 10.8.5

    How do I set up syncing Pages documents between an ipad 8.1.3 and an iMac  OS X Mountain Lion 10.8.5?

  • Limitations version d'essai - redimensionner image ?

    Bonjour à tous, question générale : je viens de télécharger une version de Photoshop Elements 8. A t elle des limitations par rapport à version commerciale (cf. point suivant) ? question précise : je débute en Photoshop Elements mais j'avais une très

  • Sizing columns in a big table

    Hello, This is something that is really driving me up the wall, if you create a table with say 12 columns and you want the first 4 to be say 100 pixels and rest to be 35. If you select the first 4 and set them too 100 pixels then select the rest and