Selecting data to enter into an array

Hi,
I am trying to enter data into an array using a case statement to select the values of interest.
The problem is this, I am running a for loop, and each time it runs it reads a specific value in the existing array (Array 1), using the for loop index as the index for the Array 1. Then I check whether that specific value = a predefined value
if it does: the case statement writes the index into a new array (Array 2).
if it does not: the case statement writes a constant - i would like not to have to do this but unfortunately the case loop must have all input terminals connected.
Essentially I want Array to to consist only of the values of interest, and no default / constant values.
Any ideas?
Solved!
Go to Solution.
Attachments:
labviewpic.JPG ‏160 KB

You are misusing Build Array.  You wire an array into one input and other arrays or values into the others.  See the example I attached.
Tim Elsey
LabVIEW 2010, 2012
Certified LabVIEW Architect
Attachments:
BuildArray.vi ‏7 KB
BuildArray.PNG ‏4 KB

Similar Messages

  • Today's date dynamically entered into text field that user enters additional text into same field.

    Trying to have today's date dynamically entered into a repeating table row textfield when the button is clicked to create each repeating row. The user can then enter addtional text into the same text field next to the date.
    Example:
    [4/25/2012] This is the text the user entered.
    Today's date is populated in each update row created when the "Update Row" button is clicked.
    The following script works but only for the first instance, not the second, third, forth, etc...
    Click event: (JavaScript, client)
    this.resolveNode('Table2._RowB').addInstance(1);
    xfa.resolveNode("Table2.RowB.#subform.Update").rawValue
    Thank you,
    ~Don

    Hi Don,
    Does this solution cover the above problem? https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw
    Niall

  • Get multiple selection data of Table into an internal table

    Hi Guys,
    I have a Table in my view layout and selected 'SelectionMode' as 'Multi' in the table properties.How to get the selected data into an internal table when rows selected on the table output.For example,I have a 10 rows in the table and selected only 5 rows,need to get these 5 rows into an internal table?
    Regards
    Nandana

    Hi,
    Here is some sample code. Please try this and let me know if you are still getting any errors.
    DATA lo_nd_table_node TYPE REF TO if_wd_context_node.
      DATA lo_el_table_node TYPE REF TO if_wd_context_element.
      DATA ls_table_node TYPE wd_this->element_table_node.
      DATA lt_table_node TYPE wd_this->elements_table_node.
      DATA lt_table TYPE wdr_context_element_set.
      lo_nd_table_node = wd_context->get_child_node( name = wd_this->wdctx_table_node ).
      lt_table = lo_nd_table_node->get_selected_elements( including_lead_selection = abap_true ).
      LOOP AT lt_table INTO lo_el_table_node.
        lo_el_table_node->get_static_attributes(
          IMPORTING
            static_attributes = ls_table_node ).
        APPEND ls_table_node TO lt_table_node.
        CLEAR ls_table_node.
      ENDLOOP.
    lt_table_node contains the selected rows.

  • How can i make it where if data is entered into a field it is mirrored to another field within the document?

    I do not want them named the same as I don't want the second one appearing until after it is entered into the first field.

    Hi,
    If the form fields have the same name then the data entered in one field will be auto populated in other with the same name. For example, if there is a form field named custom field 1 in one document and there is another field with the same name(custom field 1) in the other document and you upload them together into a single transaction and send the document, then the data entered in custom field 1 in one document will be auto populated in custom field 1 of other document as well. This also applies for one document only as well.
    Does this help?

  • How do I disallow users from saving the data they enter into an Editable form?

    Hi all,
    I am working with a client who does NOT want their users to be able to save their data. In other words, when the user opens the PDF file, they can enter data into the editable fields, but they should NOT be able to save that data as part of the PDF.
    Does that make sense?
    My client doesn't want the user to be able to save a local copy of the PDF with any of the data entered onto the form.
    Based on what I've found in my research, as of Version 11, Adobe Reader now allows users to save their data. Unfortunately, my client doesn't want that.
    Any help?
    Thanks,
    Steve

    About the best you can do is include a JavaScript that resets the form when it is saved, so no entered data remains in the fields. The problem with this approach is JavaScript can be disabled, resulting in the form not being cleared and allowing the filled-in form to be saved.
    You can address this with an additional JavaScript that runs when the form is opened that sets all of the fields from read-only to not read-only, allowing the fields to be filled-in. If JavaScript is disabled, the script won't run when the document is opened and the fields will remain read-only and therefore not fillable.
    The user would be able to work around this by having JavaScript enabled when the document is opened and disabling it after filling-in the form but before saving it. Most users would not be aware of how to do this though.
    If there are rules/regulations/laws in place that require something more certain, you'll have to take a different approach.

  • How i will increment  one day with Selected date

    hi,
    I have written a code, in this code i have selected a date from calendar. Now i want to know how will increment one day with this selected date. IS there anyone who can help me? please help me.
    With regards
    Bina

    Hi Bina,
    Lets break the task into smaller steps.
    You can research on Google and search on how to Implement the select date or enter date with Javascript.
    Lets assume that the date has been entered into a text box inside a form inside the HTML code like this:
    <form action ="target.jsp">
       <input type="text" value="" name="dateField"/>
       <input type="submit" name="submit" value="submit" />
    </form>When the user clicks the submit button, the form gets submitted, then the form redirects the user to target.jsp
    Inside target.jsp you can add a date like this
    <%
        String dateField = request.getParameter("dateField");
        // Here use substring function to extract the day , month and year from
    // date field.
        Calendar cal = Calendar.getInstance();
        cal.set(year,month,day);
    // assuming you are storing days in an integer field
    int days;
    cal.add(days);
    %>Note that I have used JSP scriptlets, and the above code is somewhat pseudo-code. Since the task is big I suggest that you break it into smaller more specific tasks and then try to implement them by searching on Google for help first.
    If you get stuck with something specific you can ask here.

  • How can I retrieve selected checkboxes by user into a JPA application?

    Hello, I'm developing an app in JPA, still learning this, I'm displaying some checkboxes which I save into a List, then I separate the selections and put them into an Array, which I convert into String and that's what I store into MySQL table, this is what I have on the index.xhtml file:
    <h:selectManyCheckbox value="#{employee.selectedItems}">
    <f:selectItems var="checkList" value="#{employee.checkboxList()}" itemValue="#{checkList.idTechnology}" itemLabel="#{checkList.name}"></f:selectItems>
    </h:selectManyCheckbox>
    The method checkboxList is in charge of generating the checkboxes and assign a value and name, and the method "selectedItems" is the List<String> that stores the selected checkboxes values, so what I save into the table is something like this: "1,4,6,7" but I don't know how to retrieve the selections and check the checxkboxes according the what the user have on the table:
    This is the method that I use to select all the records from the selected user, this fills all the textfields so I can edit the user, but not the checkboxes, and that's what I need to do:
    public void seleccionarEmpleado(int id_empleado){
    Query q = em.createNamedQuery("Employee.findByIdEmployee");
    q.setParameter("IdEmployee", IdEmployee);
    List<Empleado> listaEmple = q.getResultList();
    for(IdEmployee emple1 : listaEmple){
    emp.setIdEmployee(emple1 .getIdEmployeeo());
    emp.setName(emple1 .getName());
    emp.setLname(emple1 .getLname());
    emp.setTel(emple1 .getTel());
    emp.setAddress(emple1 .getDir());
    emp.setTech(emple1 .getTecha());
    Variable Tech is the one who gets the numbers like "2,3,4" etc, but how can I make the checkboxes to be checked according to these numbers? my english is not so good, thanks in advanced, have a nice day!

    Hello, I'm developing an app in JPA, still learning this, I'm displaying some checkboxes which I save into a List, then I separate the selections and put them into an Array, which I convert into String and that's what I store into MySQL table, this is what I have on the index.xhtml file:
    <h:selectManyCheckbox value="#{employee.selectedItems}">
    <f:selectItems var="checkList" value="#{employee.checkboxList()}" itemValue="#{checkList.idTechnology}" itemLabel="#{checkList.name}"></f:selectItems>
    </h:selectManyCheckbox>
    The method checkboxList is in charge of generating the checkboxes and assign a value and name, and the method "selectedItems" is the List<String> that stores the selected checkboxes values, so what I save into the table is something like this: "1,4,6,7" but I don't know how to retrieve the selections and check the checxkboxes according the what the user have on the table:
    This is the method that I use to select all the records from the selected user, this fills all the textfields so I can edit the user, but not the checkboxes, and that's what I need to do:
    public void seleccionarEmpleado(int id_empleado){
    Query q = em.createNamedQuery("Employee.findByIdEmployee");
    q.setParameter("IdEmployee", IdEmployee);
    List<Empleado> listaEmple = q.getResultList();
    for(IdEmployee emple1 : listaEmple){
    emp.setIdEmployee(emple1 .getIdEmployeeo());
    emp.setName(emple1 .getName());
    emp.setLname(emple1 .getLname());
    emp.setTel(emple1 .getTel());
    emp.setAddress(emple1 .getDir());
    emp.setTech(emple1 .getTecha());
    Variable Tech is the one who gets the numbers like "2,3,4" etc, but how can I make the checkboxes to be checked according to these numbers? my english is not so good, thanks in advanced, have a nice day!

  • No error but still nothing is enter into my Excel file

    this is my connection class and i enter paramters into the logPayment method ...... Im getting NO ERRO message by still no data is entered into my excel worksheet ..... and my parameters all have values in them ..... none are empty
    Can anyone help me please
    here is my code
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.GregorianCalendar;
    import java.util.Date;
    import java.util.Date.*;
    import java.util.Calendar;
    * The class which provides the link between the user interface and the spreadsheet.
    * @author John (Sean) Gleeson #100437719.
    class JDBCConnExcel
        * Creates the class, i.e initalises the mysql driver,
        * and sets up the connection to the database.
       public JDBCConnExcel()
          try
             // Initialise drivers
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          catch(Exception e)
             System.out.println("Failed to load JDBC/Excel driver.");
          //Setup connection to database
          try
             //Make connection to database
             connectionObject = DriverManager.getConnection (ODBC, username, password);
             // Setup statement stream
             statementObject= connectionObject.createStatement();
          catch(SQLException sqle)
                  String msg = getClass().getName() + ".method() : An exception of type " + sqle.getClass().getName() + " was thrown with the following message [" + sqle.getMessage() + "]" ;
                  System.out.println(msg) ;
        ***************************getters***********************************
       public void logPayment(String mastID, String name, String address,
          String town, String county, double amount)
          PreparedStatement aPreparedStatement = null;
          File inputFile = null;
          Connection con = null;
          DatabaseMetaData dmd = null;
          try
            inputFile = new File("payment.xls");
         System.out.println("AutoCommit:"+connectionObject.getAutoCommit());
         dmd = connectionObject.getMetaData();
         System.out.println("MaxConnections:"+dmd.getMaxConnections());
         System.out.println("PositionedUpdate:"+dmd.supportsPositionedUpdate());
         System.out.println("SelectForUpdate:"+dmd.supportsSelectForUpdate());
         System.out.println("StoredProcedures:"+dmd.supportsStoredProcedures());
         System.out.println("Transactions:"+dmd.supportsTransactions());
         dmd = null;
            System.err.println("Readonly = " + connectionObject.isReadOnly());
         aPreparedStatement = connectionObject.prepareStatement ( "INSERT INTO [Receipt$] ([MastInterferenceID], [Name], [Address], [Town], [County], [AmountPaid]) VALUES ('"+mastID+"','"+name+"','"+address+"','"+town+"','"+county+"','"+amount+"');") ;
         System.err.println(aPreparedStatement.executeUpdate());
         connectionObject.commit();
         System.err.println("Committed?");
          catch (Exception e)
            e.printStackTrace();
          finally
         try { aPreparedStatement.close();
               if(dmd!=null)
                            dmd = null;
               if(con!=null)
                            con.close();
                catch (Exception e) {}                    
        /   //==============instance variables=================================================//
       private Connection connectionObject;
       private Statement statementObject;
        * odbc name.
       private String ODBC = "jdbc:odbc:pl";
       //jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=pathName;DriverID=22;READONLY=false","","");
       //Above used to write any xls file
       private String username = "";
       private String password = "";
    }  

    try { aPreparedStatement.close();
               if(dmd!=null)
                            dmd = null;
               if(con!=null)
                            con.close();
                catch (Exception e)
                     e.printStackTrace();  
                }instead of catching the last error i printed it and it came up with an error of nullPointerException
    for the line of code
    try { aPreparedStatement.close();how can i fix this error please
    and thank you

  • Query a view w/data entered into a text field populated by 2 table fields

    Hello, Looking for advise!!! I have a tabular canvas thats datablock uses a view to populate. In this canvas I have a text field that has been populated with first_name || ' ' || last_name in the database node of the property pallate column name. The text field is not in the table or view. I have created it in the data block and make it a database item. However, I would like to have the user push a search button to go into ENTER_QUERY mode then the user would enter the criteria to search on in this text field. The user would then push button to EXECUTE_QUERY. The result is I retrieve all records. I want any search criteria entered into this field to be used against the last_name field to retrieve any records equal to the search criteria entered, for example A%. Does anyone know if this is possible?

    Hi!
    You have to use PRE-QUERY trigger to compose the search criteria. Below I put an example of it. You have to have at least one item in the block wich is true database item (e.g. it has to exist in table or view on which your block is based). In the following example EMP_DESC is your non-database search item and EMP_ID is the database one.
    Declare
    Dummy VARCHAR2 (2000);
    begin
    if :EMP.EMP_DESC IS NOT NULL and :EMP.EMP_ID IS NULL
    then
    Dummy := '#IN (SELECT emp_id FROM Employees WHERE Upper (emp_first_name)||'' ''||Upper (emp_sec_name) LIKE Upper (''%'||:EMP.EMP_DESC||'%''))';
    Copy (Dummy, 'EMP.EMP_ID');
    end if;
    end;
    Thats it. Note the # sign in the first position of the Dummy assignment. This is required by forms to glue your search criteria and block's where clause. You may analize LAST_QUERY property of your block in order to understand how this work. Remember also to set the QUERY_LENGTH property of the EMP_DESC item to the value that could contain the whole Dummy string (otherwise it will give you an error and cut the mar the query).
    Hope this helps.
    Sergey.
    P.S. And set your EMP_DESC database item property to NO.

  • (Urgent help needed) how to read txt file and store the data into 2D-array?

    Hi, I have a GUI which allow to choose file from the file chooser, and when "Read file" button is pressed, I want to show the array data into the textarea.
    The sample data is like this followed:
    -0.0007     -0.0061     0.0006
    -0.0002     0.0203     0.0066
    0     0.2317     0.008
    0.0017     0.5957     0.0008
    0.0024     1.071     0.0029
    0.0439     1.4873     -0.0003
    I want my program to scan through and store these data into 2D array.
    However for some reason, my source code issues errors, and I don't know what's wrong with it, seems to have a problem in StringTokenizer though. Can anybody help me?
    Thanks in advance.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.StringTokenizer;
    public class FileReduction1 extends JFrame implements ActionListener{
    // GUI features
    private BufferedReader fileInput;
    private JTextArea textArea;
    private JButton openButton, readButton,processButton,saveButton;
    private JTextField textfield;
    private JPanel pnlfile;
    private JPanel buttonpnl;
    private JPanel buttonbar;
    // Other fields
    private File fileName;
    private String[][] data;
    private int numLines;
    public FileReduction1(String s) {
    super(s);
    // Content pane
         Container cp = getContentPane();
         cp.setLayout(new BorderLayout());     
    // Open button Panel
    pnlfile=new JPanel(new BorderLayout());
         textfield=new JTextField();
         openButton = new JButton("Open File");
    openButton.addActionListener(this);
    pnlfile.add(openButton,BorderLayout.WEST);
         pnlfile.add(textfield,BorderLayout.CENTER);
         readButton = new JButton("Read File");
    readButton.addActionListener(this);
         readButton.setEnabled(false);
    pnlfile.add(readButton,BorderLayout.EAST);
         cp.add(pnlfile, BorderLayout.NORTH);
         // Text area     
         textArea = new JTextArea(10, 100);
    cp.add(new JScrollPane(textArea),BorderLayout.CENTER);
    processButton = new JButton("Process");
    //processButton.addActionListener(this);
    saveButton=new JButton("Save into");
    //saveButton.addActionListener(this);
    buttonbar=new JPanel(new FlowLayout(FlowLayout.RIGHT));
    buttonpnl=new JPanel(new GridLayout(1,0));
    buttonpnl.add(processButton);
    buttonpnl.add(saveButton);
    buttonbar.add(buttonpnl);
    cp.add(buttonbar,BorderLayout.SOUTH);
    /* ACTION PERFORMED */
    public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("Open File")) getFileName();
         if (event.getActionCommand().equals("Read File")) readFile();
    /* OPEN THE FILE */
    private void getFileName() {
    // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
    if (result == JFileChooser.APPROVE_OPTION)
         fileName = fileChooser.getSelectedFile();
    textfield.setText(fileName.getName());
         if (checkFileName()) {
         openButton.setEnabled(false);
         readButton.setEnabled(true);
         // Obtain selected file
    /* READ FILE */
    private void readFile() {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines();
         data = new String[numLines][];
         // Read file
         readTheFile();
         // Output to text area     
         textArea.setText(data[0][0] + "\n");
         for(int index=0;index < data.length;index++)
    for(int j=1;j<data[index].length;j++)
    textArea.append(data[index][j] + "\n");
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines() {
    int counter = 0;
         // Open the file
         openFile();
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile();
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* READ FILE */
    private void readTheFile() {
    // Open the file
    int row=0;
    int col=0;
         openFile();
    System.out.println("Read the file");     
         // Loop through file incrementing counter
         try {
    String line = fileInput.readLine();
         while (line != null)
    StringTokenizer st=new StringTokenizer(line);
    while(st.hasMoreTokens())
    data[row][col]=st.nextToken();
    System.out.println(data[row][col]);
    col++;
    row++;
    closeFile();
    catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName() {
         if (fileName.exists()) {
         if (fileName.canRead()) {
              if (fileName.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* FILE HANDLING UTILITIES */
    /* OPEN FILE */
    private void openFile() {
         try {
         // Open file
         FileReader file = new FileReader(fileName);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File opened");
    /* CLOSE FILE */
    private void closeFile() {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    /* MAIN METHOD */
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException {
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Java.lang.NullpointException
    at FileReductoin1.readTheFile <FileReduction1.java :172>
    at FileReductoin1.readFile <FileReduction1.java :110>
    at FileReductoin1.actionPerformed <FileReduction1.java :71>
    .

    1) Next time use the CODE tags. this is way too much unreadable crap.
    2) The problem is your String[][] data.... the only place I see you do anything approching initializing it is
    data = new String[numLines][];I think you want to do this..
    data = new String[numLines][3];anyway that's why it's blowing up on the line
    data[row][col]=st.nextToken();

  • Possible to automatically select text field data on enter

    I have been trolling this forum for a couple weeks and have figured out everything on my form except this issue.
    I would like my form to automatically select the "data" that is in a text or numeric field when the field is entered. 
    For example:  If I open a form that has been filled out previously I would like each field's data to be selected when I enter the field either by tab or clicking on the field.  This way I can overwrite the current data much easier without having to double click to "select all" or backspace to delete the current field.  It is possible that the data should stay the same so I dont want the data to be deleted on enter just "selected"
    Thanks for your help,
    Joe

    Hi Joe, When using the keyboard and tabbing to a field all the fields contents are selected, but this doesn't happen when using the mouse and clicking into a field.  Have a look at this sample which tries make the mouse behave the same as the keyboard http://adobelivecycledesignercookbookbybr001.blogspot.com.au/2013/05/on-click-select-all-t ext-in-form-field.html.  Bruce

  • How to restrict user to select date from the calendar into a text item

    Hi All,
    I am using oracle 10g.IN a form i am having a block 'client_block' in that i am having a text_item ' entry_date' which is a datebase item and i have set enabled false in property palette and i created an image item on the same form and i have an calendar icon on it .In when_image_pressed trigger for image item i have written this code
    SET_ITEM_PROPERTY('CLIENT_BLOCK.ENTRY_DATE',ENABLED,PROPERTY_TRUE);
    DATE_LOV.Get_Date(sysdate,'CLIENT_BLOCK.ENTRY_DATE');
    This is working perfectly but user can enter or delete date into the text_item through keyboard i want to restrict that they can only select date from calendar.
    I have tried setting item property enabled false in triggers but it is not working.
    Can someone help me what trigger i have to use and how?.
    Thanks
    Sri

    Hi,
    This is working perfectly but user can enter or delete date into the text_item >>>through keyboard i want to restrict that they can only select date from calendarSet Insert allowed to 'NO' in property pallete of item ENTRY_DATE.
    In ON-ERROR Trigger::
    BEGIN
    DECLARE
    err_code CONSTANT NUMBER := error_code;
    err_type CONSTANT VARCHAR2(3) := error_type;
    BEGIN
    IF (err_type = 'FRM'
    AND err_code IN (40200)) THEN
    Message('Updates Not allowed, Please Select Your Date from Calendar');
    Message(' ');
    ELSE
    NULL;
    END IF;
    END;
    END;
    Thanks,
    Bhujendra

  • How to take waveform chart data and put it into an array

    Hello all,
    I am new to programming in Labview, and am learning basically by watching youtube video and such. My question is how to take a set of random data that I have written code for and linked to a waveform chart, and put the data into an array so I can calculate the mean of the data set. If there is an easier way to calculate the mean of the data set I am all ears, but I need to be able to display the mean on the front panel each time the code is run. I have attached a file of my code.
    Thanks
    Attachments:
    CA1.vi ‏11 KB

    Welcome.
    If you have not done so, look at the on-line tutorials on Getting Started with LabVIEW on the NI web site.
    A chart has a property known as History which retains some previous values.  You can get access to the the History property by popping up on the block diagram terminal of the chart and selecting Create >> Property Node. Note that the history length can be set via a pop up menu.  The default length is 1024.
    Other comments: When you know the number of iteration in advance you should use a for loop rather than the while loop.
    You can also use an autoindexing tunnel at the boundary of the loop to create an array. It only contains the values from the current run, unlike the chart history which can retain values between runs (as long as the VI remains in memory). Watch the two Mean indicators as you run this VI several times.
    The error wire is to assure that the history property node runs after the loop.  Disconnect the wire and watch the Mean and Mean 2 indicators carefully.
    The Wait is to slow things down a bit so that you can see what is happening.
    Lynn
    Attachments:
    CA1.2.vi ‏11 KB

  • Moving data string from a jtextarea into an array

    i was looking for some advice. how would i be able to take chunks of text on a paragraph by paragraph basis and enter them into an array. which would result in paragraph1 in array 0, and so on. is this possible to do? i have never really used straing arrays before, and if anyone knows of any online tutorials it would be a great help
    thank u

    here you go, forgive the gui, very sloppy looking, press the Click me button to store the jtextarea data into the array and show output button to see what the value stored in the array is. there are 2 classes:
    class MyMain {
          public static void main(String args[]){
              MyMain main = new MyMain();
              main.createIt();
          public void createIt() {
              MyFrame frame = new MyFrame();
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    class MyFrame extends JFrame {
          String[] myString = new String[1];
          JTextArea textArea = new JTextArea();
          JButton myButton = new JButton("Click me");
          JButton outButton = new JButton("Show output");
          MyFrame() {
              myButton.addActionListener(new ButtonListener());
              outButton.addActionListener(new OutListener());
              getContentPane().setLayout(new GridLayout(1,3));
              getContentPane().add(myButton);
              getContentPane().add(textArea);
              getContentPane().add(outButton);
              setVisible(true);
          class ButtonListener implements ActionListener{
              public void actionPerformed(ActionEvent e){
                  myString[0] = textArea.getText();
          class OutListener implements ActionListener{
              public void actionPerformed(ActionEvent e) {
                  System.out.println(myString[0]);
    }

  • Pasting data into TestStand arrays

    Is there really no way to cut-and-paste values from a spreadsheet (or any other source) into an array variable in TestStand? I know I can go the other direction, but that's not helping me right now.
    I really don't want to sit here and type in 148 numbers. And I don't want to write a kludgy program to do it using a SequenceFile object.
    Surely there must be a better way...

    Currently the TestStand sequence editor does not allow you to edit selected properties as you are suggesting. As you said, the only option is to enter them manually, or create a tool that operates on a sequence file and the tool must use a path to the property that you want to edit in some way. Currently the TestStand engine does not allow the sequence editor to specify what the currently selected property is creating a tool must edit the sequence file or step and you must supply the path to the property. We hope to address this in the future.
    Scott Richardson
    Scott Richardson
    National Instruments

Maybe you are looking for

  • Bind variable not picking up a global value... FUSTRATING!!! :(

    Its pretty simple, but I dont know whats going on... heres a brief example of whats going on.... :GLOBAL.VARIABLE1 := 1; MESSAGE(:GLOBAL.VARIABLE1); MESSAGE(:GLOBAL.VARIABLE1); :LOAN_DEALS.DEAL_KEY := :GLOBAL.VARIABLE1; MESSAGE(:LOAN_DEALS.DEAL_KEY);

  • I want to count the elements in the pipeline and also process them

    The following script works, but only because I save the pipeline contents in a variable.  I would like to not have to save it - see below. The commented section is my most recent failure. (And BTW I know the script has nothing to do with ZIP: that's

  • Transposing image to artwork

    I've got some artwork done in illustrator. Straigh "line" art.  Imaging a 4" square with 50-75 lines/inch horizontally. What I want to do is superimpose an image onto the lines, leaving everything in between the lines blank. Any ideas? Thanks! Ps- I'

  • Complex rollover - I can't get this to work. Please help!

    I tired this tutorial several times over: http://www.layersmagazine.com/flash-button-animation.html I realize this is AS2. I tried it in using that as well as AS3 (I'm TOTALLY new to this). Here's the fla file I ended up with: http://aaronpenton.net/

  • P70-A 3G problem

    Dear Lenovo, I assume you have been already informed by your Bulgarian colleagues about issues with P70-A. The problem with this device is that it is not working properly on 3G netwroks in Bulgaria. In fact most of the time it doesn't work and result