Data from the drop-down list box database

Hello

I'm trying to understand how to add information from a database to a drop-down list box. I read two columns, the first is used as the element and the second for the value. There are several lines in the table, and I need an entry for each. Currently, he adds only a single entry. The vi is attached.

Thank you

Chris

Hi again,

Attach a VI... Is that what you mean?

Tags: NI Software

Similar Questions

  • Command to refresh a calculated field when you select an option from the drop-down list box

    When my form user selects an option in a drop-down list box, the value in the field (in this case, Total) I would like to update, but it isn't.

    A radio button option box makes the Total-development field to automatic update when the user clicks on the radio button. But the drop-down list box is not updated Total (without clicking away from the field). I would like to add a command in the Combo Box to refresh the Total field when you selected the option to drop-down list box.

    Someone at - it a code (Javascript?) to get there.

    Thank you very much.

    You don't need a script, simply select the 'Value selected to validate immediately' checkbox on the Options tab of the dialog list box drop-down list box field properties.

  • Automatically populate a drop-down list by using another selection from the drop-down list box

    New java/preparation forms so I apologize in advance.

    I currently have a menu drop-down box 1 (Occupation) with three options: "enter your own description/blank", retired housewife. When someone chooses either retirement or anyone at home, I would another drop box 2 (employer) to assign automatically "n/a. . The employer drop box has only two options: "enter your own/blank", N/A.

    Far, I could for that box to fill but only when the person clicks in the box (as if they were about to enter their own text.) Then only it will fill the drop-down list "employer." I would like it auto fill once the person has chosen retired, Virgin or stay-at-home woman without having to enter in the box (just using the arrow to the size of the drop-down list box).

    I currently have a key shot that resets the employer box when a person chooses the option vacuum/enter your own option. I then a JavaScript (only for the housewife now) that only works if you click the box of. Key combination works I want to than the other options work as well. If the client settles on white, the choice of the employer updates automatically empty without having to click in the box of. Any help (including general advice to make my code cleaner) is very appreciated!

    Current script of typing:

    If {(event.willCommit)

    If (event.value == "") this.resetForm (["use"]); of other SetFieldValues (event.value);

    }

    The current upward, mice running JavaScript :

    var v = this.getField ("Occupation") .value

    If (v is "Housewife")

    1. this.getField("Employer").value = "N/a".

    I think maybe I should use event.willCommit in my formula, but I'm not sure how to include it.

    Thank you!

    I would not use the key sequence or MouseUp actions for this, but the action post.

    Just make sure that you set the field option to validate the selected value immediately (under Properties - Options) and then use this code as the custom validation script:

    var employerField = this.getField("Employer");
    if (event.value=="Homemaker" || event.value=="Retired")
        employerField.value = "N/A";
    else employerField.value = employerField.defaultValue;
    
  • Try to get the value of exports from the drop-down list box

    Using the "strikes a custom Script" for a drop-down list box:

    This works, but gives the current face value


    If (event.willCommit)
    {
    App.Alert (Event.value);
    }

    This works, but returns the previous export value


    If (event.willCommit)
    {
    App.Alert (Event.Target.value);
    }

    What I need is clicked on the current export value items as soon as we clicked.

    What I am doing wrong?

    Note that it returns nothing if event.willCommit is true, but it returns the value of the export, if it's false.

  • fill a list based on a value from the drop-down list box

    Well, I know a way around it but its quite long with what I know. I worked on a better solution for a day now. So maybe (or likely) someone knows better. I'm trying to fill a drop drop down based on a user selection figure in a list of check boxes. I know I could create several drop-down lists and hide away them until the user changes the value of binding. But the dropdowns would consume a lot of space in my form design in liveCycle. So is there another way or I'm stuck he made a long journey. I also need to assign values to these elements, since they change because the values are used as item numbers later that fill a text/number field later in form as a list of materials.

    Tell me if I'm wrong, please (I'm new to all this)

    in the box in the click event

    If (this.) RawValue == 1)

    {

    dropDownList1.addItem ("item # 1", "value1111");

    dropDownList1.addItem ("item # 2", "value2222");

    }

    on the other

    {

    dropDownList1.rawValue = "null";

    }

    I'm sure that null is not good and I don't know that I have to set the drop-down menu to clear items on preOpen. Or maybe not. And there is a way to add items without the addition of a new right of the line? I'm on the right track?

    Hello

    Rather than having the script in each of the boxes, you can have the script in the event preOpen the drop-down list that leans on the boxes.

    I downloaded an example here: https://acrobat.com/#d=VwREjsMgvqXpVqPu54kSNw

    Take a look at the preOpen the dropdown event.

    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems(); 
    
    // repopulate the items based on the checkboxes
    if(fruit.rawValue == 1)
    {
         this.addItem("Apples", "fruit_001");
         this.addItem("Pears", "fruit_002");
         this.addItem("Oranges", "fruit_003");
         this.addItem("Bananas", "fruit_004");
         this.addItem("Grapes", "fruit_005");
    }
    
    if(cars.rawValue == 1)
    {
         this.addItem("Volvo", "car_001");
         this.addItem("Ford", "car_002");
         this.addItem("Opel", "car_003");
         this.addItem("Toyota", "car_004");
         this.addItem("Nissan", "car_005");
    }
    
    if(counties.rawValue == 1)
    {
         this.addItem("Co. Tipperary", "county_001");
         this.addItem("Co. Cork", "county_002");
         this.addItem("Co. Dublin", "county_003");
         this.addItem("Co. Clare", "county_004");
         this.addItem("Co. Kerry", "county_005");
    }
    

    Hope that helps,

    Niall

  • How to read data from the drop-down list

    Hi all

    I use this to display a drop-down list.

    inputScreen.add (new NumericChoiceField ("number of objects:", iStartAt, iEndAt, iIncrement, iSetTo));

    How to read the data selected by the user? say if my list contains from Monday to Saturday, how will I know what day selected by the user? and how that store in the variable? Thank you.

    You have your data in a table and this stone he is used to populate the ObjectChoiceField. The FieldChanged listener you can obtain what the iteme selected to help index:

    int index = yourObjectChoiceField.getSelectedIndex ();

    and for the use of the object:

    Bean of MyObject = myObjectArray [index]

  • How to display the drop-down list box in MS excel by using labview report generation toolkit? pleasepost code block diagram?

    How to display the drop-down list box in MS excel by using labview report generation toolkit? Please post the block diagram of the code so that I can able to generate from the drop-down list box in excel with the menu drop-down...

    Like this. (edition, use the reference forms instead of the reference to the worksheet)

    Ben64

  • Reg - key event "F1" in the drop-down list box

    Hello

    Requirement:

    I need that to launch a browser window press the 'F1' key during the video (swf) has the focus. I did and it works very well for me in the web application.

    Problem statement:

    When a film was released and with focus in "Combo" (which has the list of items begins with A letter Z) control then, I pressed the 'F1' key but the browser window has been launched, instead "main action from the drop-down list box event fired and the article begins with the letter 'P' has been selected in the combo box." So now again once I hit 'F1', the browser window launched according to my condition.

    This behavior occurs whenever launched film has the focus in the "combo box"; otherwise, if the focus is on another control as TextInput etc, no problem for me. A more information, if the drop-down list box is not no matter what element does begin with the letter 'P' so no problem for me.

    I tried to understand the behavior of the combo, but again, I have no idea. Please share your knowledge/thoughts.

    Environment:

    Flex builder 3.5

    11.2 Adobe flash player

    Windows XP SP3

    Kind regards

    Mani

    Hello

    I just replaced Manager keydown to the ComboBox component to avoid his own behaviour of spread of events if the 'F1' key and his works fine for me.

    Thanks for all,

    -Mani

  • cannot detect if it is has only 1 item in the drop-down list box?

    I have an array of strings to put them in the drop-down list box, a drop-down list box. I will select an item in the drop-down list box drop-down list and press the button 'delete '. It removes the item from the drop-down list box. but when I come to the last drop-down list box, im unable to remove offshore because it does not get pass this line...

    myEntries.selectedItem.label is myArray [i]

    Why do myEntries.selectedItem.label is not detected in the last element?

    Entries.addEventListener (Event.CHANGE, EntriesChange)

                   }

              }

    "" var str_entries:String = "";

    //set default

    function EntriesChange(e:Event):void {}

    for (var i = 0; i < myArray.length; i ++)

                   {

    { if (myEntries.selectedItem.label == {myArray [i].)}

    str_entries = myArray [i];

    trace ("str_entries =" + str_entries)

                        }

                   }

              }

    You can not able to delete the index 0th, the code below, did the trick:

    delbtn.addEventListener (MouseEvent.CLICK, delfn);
    function delfn(e:MouseEvent):void {}
    var str:String=String(Entries.selectedItem.label).toLowerCase();
    for (var i = 0; i)<>
    var str1:String=String(myArray[i]).toLowerCase();
    If (str == str1) {}
    Entries.removeItem (Entries.selectedItem);
    If (Entries.length == 0) Entries.removeAll ();
    str_entries = myArray [i];
    }
    }
    }

  • How to fill out the database in the drop-down list box

    Hi all, I want to display all the data in database (c_type) column in the drop-down list box, how can I do?

    I use form 6i.

    Sorry if the question is already exist in the forum...

    Kind regards

    Maybe this helps http://andreas.weiden.orcl.over-blog.de/article-28957008.html

  • XLATLONGNAME from the drop-down list should be a default value in the edit box

    Hello


    I have two fields in a grid, one named "TEST_Type" and one is named 'TEST_Name' edit box
    Use cases, TEST_Name by default will be TEST_Type in Drop Down.

    "TEST_Type" is the translation of edition Table and 'TEST_Name' will contain XLATLONGNAME.

    I do drag XLATLONGNAME of PSXLATITEM table in my grid and make related field and "TEST_Type" a related control field.

    Show LongName according to the value "TEST_Type.

    If the field 'TEST_Name' RowInit, I wrote

    If GetRow(). IsNew and
    No (MYRecord.TEST_NAME. Value) then
    MYRecord.TEST_NAME. Value = GetRow(). GetRecord (Record.PSXLATITEM). GetField (Field.XLATLONGNAME). Value;
    End - If;


    It gives an error

    "Class line method GetRecord account PSXLATITEM is not valid. (2 268)

    MYRecord.TEST_NAME. RowInit

    The recording has been used as a parameter of the specified method. It is not valid for the current object. »

    What is the problem?

    Is there a better solution for this use case?


    Thanks in advance

    I think you mix a few think upwards.

    The drop is on a class with the values of translate. So, when you set the property to the field from the drop-down list page to view the longxlatitem, you are finished.

    If you want to copy the xlatlongvalue for some reason any other areas, use instead the domain object properties.

    & dropdownlownlist = getrecord([YOUR_RECORD]).getfield ([YOUR_FIELD]);
    VALUE = & dropdownlownlist. LongTranslateValue;

    Kind regards

    Halin

  • Help select the value from a drop-down list box

    Hello

    I develop a script (in JavaScript) which will allow a user to select an export PDF presets (that are loaded in a drop-down list) and then export the InDesign file to PDF, by using the selected PDF preset.

    I have the combo fill properly and I am also able to export to PDF correctly, however I have a problem setting the preset has been selected by the user. Here are some of my code fragments:

    Drop-down list:

    with(borderPanels.add()) {

         pdfDD = dropdowns.add();

         sl = new Array();

         for (i = 0; i < app.pdfExportPresets.length; i++)

         sl.push(app.pdfExportPresets[i].name);

         pdfDD.stringList = sl;
         pdfDD.selectedIndex = 0;

    }

     

    ...

     

    myPreset = pdfDD.selectedIndex;

    In PDF format:

        // Open, Export, & Close
        for (i = myFileAmount; i >= 0; i--) {
            app.open(File(myFolderContents[i]));

            createHyperlinks();

            app.activeDocument.exportFile(
            ExportFormat.pdfType, File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"), false, myPreset);
            app.activeDocument.close(SaveOptions.no);
        }

    During the passage of myPreset, it is defined as 6 (the index from the drop-down list).  How can I set myPreset that the real value of what has been chosen?

    Thank you!

    In view of your code, you probably need something like:

    myPreset = app.pdfExportPresets.itemByName (pdfDD.stringList [pdfDD.selectedIndex]);

    @+

    Marc

  • Validation in the drop-down list box

    Hello

    I use JDev 11.1 with fusion ADF

    I have the drop-down list box, this drop-down list box include a description and the value I want to if the user choose value e.g. - 2 and press the button Save appear validation said cannot insert this value, how can I do?

    Note that this drop-down list box to retrieve data from managed bean (not the view object)

    Concerning

    Hello

    You add a validator to your combobox component.

    Select your component in the property inspector-> Behaivour-> Validator-Edit... and create a method, and then you add the validation code it.

    More details on custom validators: http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_val004.htm#CIHFJBDI

    Greetings,
    Bogdan

  • Display all items or all files in the drop-DOWN list BOX

    Hello

    How to show the total files available in the drop-down list box by scrolling.

    In my project, I have to store the Daq measurement values in file.

    Later, I need to plot a graph since the values of a specified file.

    For this I need to select a file from the number of files.

    Give an idea or a sample program.

    Kind regards

    Hari

    Hi hari,.

    I couldn't open your vi I use Labview 8.5.

    See vi attached with this post.

  • Impossible to delete previously selected items from the drop-down lists at the click of the button Reset on a page of the screen.

    Hello

    I'm unable to clear previously selected items from the drop-down lists at the click of the button Reset on a page of the screen. The code I did to clear the previous value when the click on the button Reset is as below.

    {} public void onReinitialize (ActionEvent actionEvent)

    System.out.println ("onReinitialize is called ::");

    UIComponent uiComp = actionEvent.getComponent ();

    If (uiComp is nothing)

    {

    otherwise we use the button that we linked to that bean

    uiComp = getButtonResetByBean ();

    _logger.info ("reset fields: buttonID =" + uiComp.getId ());

    }

    on the other

    {

    _logger.info ("reset fields: CompID =" + uiComp.getId ());

    }

    Pass the component inside the uniforms, UIXForm, UIXSubform, UIXRegion, UIXPopup, RichCarousel

    or RichPanelCollection that contains the components to reset

    getTextIDLOV () .setValue (null);

    ResetUtils.reset (uiComp);

    }

    ---

    Using this code Iam able to clear the entrance to the text box but can not clear previously selected items from the drop-down lists when the reset button is clicked

    Can anyone please help on this issue.

    It's simple, you can set GenerateIsNullClauseForBindVars = "false" in the viewCriteria who created in EmployeeView

    After doing that it will fill the list of employees only after the Department selection

    Again check the enclosed application

    Ashish

Maybe you are looking for