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

Tags: Adobe LiveCycle

Similar Questions

  • Change the border color of text field based on a value from the drop-down list

    I have a dropdown menu with 4 choices of priority for maintenance.  With a javascript script, I need to be able to select a 'priority' in a list box and a text box border then color with an appropriate color.

    'High priority' with an export value of 0

    "Medium priority" with a value of exports of 1

    'Low priority' of an export value of 2

    "When the time allowed" with a value of exports of 3

    When one of these selections has been filed, a text box becomes available in order to write the gap. My goal is as follows.

    When "High priority" is selected, the border of the text box where you write the gap would blush.

    When "Moderately urgent" is checked, the border around the text box where you write the gap would turn yellow.

    When "Low Priority" is checked, the border of the text box where you write the gap would become green.

    When "when she allows" is checked, the border around the text box where you write the gap would have turned blue.

    Otherwise, the border would be white.

    This form will be used ultimately on an iPad using Expert PDF under the player.     I use Acrobat X to create the form.

    Any help would be appreciated.

    Yes, I accidentally left a hug. I can fix it so it won't be a problem if someone tries to use it. Happy that you guessed it work.

    To handle resetting, you can use a script to validate drop-down list:

    Script to Validate drop-down list

    If (event.value = "" "") {}

    getField("discrepancy_1").strokeColor = color.white;

    }

  • Value from the drop-down list

    The value of the drop-down list are A, B, C.

    If 'A' check the box, Text_A will be equal to Text_1. (this.getField ("Text_A") = this.getField ("Text_1") .value)

    What is the code and where should I put it?

    I did the code for it, but it shows invalid left hand.

    As the combo validate the script, enter this:

    this.getField("Text_A").value ="";

    this.getField("Text_B").value ="";

    this.getField("Text_C").value ="";

    If (event.value == "A")

    this.getField("Text_A").value = this.getField ("Text_1") .value;

    Else if (event.value == "B")

    this.getField("Text_B").value = this.getField ("Text_1") .value;

    Else if (event.value == "C")

    this.getField("Text_C").value = this.getField ("Text_1") .value;

    etc.

  • Restore the default value from the drop-down list

    Hyperion Inreatctive reports.

    I have an embedded in a dashboard report.  I drag the lists that filter the report.  Filter feed results and it works fine.

    I want to put a command button on the dashboard that restores the default values from the dropdown lists.  I have a selection in each drop-down menu, 'all '.  "All" is the default value.

    For example, for the year

    drop_Year

    for the region:

    drop_Region

    What command should I put on the command button that any value is displayed in the drop-down lists of this command, restore it to "all"?


    Watch the Select() method

    w

  • selecting a value in the drop-down list but page must not get recharged again.

    Hello
    I created a drop-down list. After you have selected a value from him, I can get a value in the box of text below according to updon one sql query. but the problem is that I HAV to select Page Action when the changed value parameter to the set value and redirect. Thanks to her whenever I have to select a value from the drop-down list, page get updated. Is there a way that will satisfy the requirement but page does not get new dependants.
    I use apex 4.2.
    Thank you

    You can create A dynamic Action to set the value while changing the value in the Select list (drop-down list).

    Event: change
    Selection type: item (s)
    Article (s): choose your selection list item
    Action: Execute the PL/SQL Code
    PL/SQL code:

    begin
    select colum_name into :Px_text_item_name from table where column_name=:px_select_list_name;
    end;
    

    Page elements to send: px_select_list_name
    Page referred to return: Px_text_item_name

    Its work for me without refreshing the page. Assume that, if you want to pass this value to the element in another page, then use the branch for redirection and assign the value to the element on the page of another.

    Thank you
    Lacombe

  • 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

  • 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

  • Dynamic region on the change from the drop-down list of values

    Hi Experts,

    Using the concept of dynamic region, I tried to use buttons as I have 4 buttons and clicking on each button, I am loading the particular taskflow. I used setPropertyListener and type = action to achieve this.

    I have a similar requirement, but I need to use the drop down list here...

    < af:selectOneChoice value = "#{mybean.value}" >

    < f: selectItem itemLabel = "First" Valeurelement = "FirstValue" / > "

    < f: selectItem itemLabel = "Second" Valeurelement = "SecondValue" / > "

    < f: selectItem itemLabel = "Third" Valeurelement = "ThirdValue" / > "

    < f: selectItem itemLabel = "fourth" Valeurelement = "FourthValue" / > "

    < / af:selectOneChoice >

    How can I dynamically load a region on the value selected by the user on top of the data. On the change of the value in the drop-down list, I need to load this particular dynamic region

    JDeveloper version 12.1.3

    Thanks in advance.

    You use a listener to change value of the duo down and detect the region according to the new value of the duo down.

    Timo

  • Criterion from the drop-down list value null | " "

    I wrote a script to sign before testing a value in a drop-down list before allowing the signing of the document. However, I want to test a null plus a space aka "". "" I added a value in the drop-down list of "" as well as the choice of names for users could erase an accidental in this list selection before they were ready. However when I place the operator (|) in the case or statement of the script, the script does not work. If I remove the | "" declaration the script works as it is supposed to. " How to test for this value of "" as well as the test null so I don't have to write a further statement?

    If (form1. Page3.author.reviewed.admin.RawValue == null | " ")

    {

    xfa.event.cancelAction = 1

    xfa.host.messageBox ("you have not selected your name on the drop-down list before trying to sign the document.");

    }

    on the other

    {}

    ;

    If the declaration is incomplete. You need to test again for the other value:

    If (form1. Page3.author.reviewed.admin.RawValue == null | Form1. Page3.author.reviewed.admin.RawValue == "") ""

  • 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

  • Unable to increase the Indent/margin left on the value in the drop-down list (no label)

    Hello

    How is it that I can't increase the left margin for the part of the value of the drop-down fields?  Just to clarify, I'm not trying increase the left margin in the setting tab on the page of the object, but the left indent or margin of the value selected in the drop-down list.  The text is just against the left side of the drop-down list box, as you can see in the first picture below, where defence"is.   When I go into formatting, withdrawal of left which cannot be increased from zero.  Any help is appreciated.


    temp.png


    temp2.png


    Alternatively, you can cheat it. It seems to work. Define the field as a text field, and the dash. Then go to the Type of object field and replace it with a drop-down list. This seems to keep the dash.

  • Choose a value in the drop-down list and sumbit

    Hello

    I am completely new to the forms and javascrpit so my question is very simple:

    I created a drop down list with names.

    I want to push a button and submit the pdf doc to the letters to the coresponding name from the drop-down list.

    My code

    ……

    var aa = DropDownList1.rawvalue;

    var bb;

    If (aa = 'George') {bb ="[email protected]" "}

    ElseIf (aa = "Nikos") {bb ="[email protected]" "}

    event.target.mailDoc (true, bb, "", "", "PDF form is returned");

    ….

    The code has no bugs, but after pressing the button, the pdf is sent allways to [email protected] . He behaves as if I said a constant bb ="[email protected]"" "

    It does not take into account the value in the menu drop-down

    Could you please help me?

    Concerning

    There is a second bug in your script, I have identified no before.

    var aa is DropDownList1. rawvalue;

    should be

    var aa is DropDownList1. rawValue;

  • Update from the drop-down list on the duration

    Hello, I'm fairly new to Java and Blackberry development.

    I am doing an application with a few editable text fields and drop-down lists. What I want to do is to change the options from the drop-down list (ObjectChoiceField), according to what is written on the text fields, all without pressing a button. Can someone give me a hand here? I thought to use invalidateAll to redraw the field, but I'm not sure.

    Thank you.

    OK, something else, this looks bad for me:

    your having

    unitChoiceField.setChangeListener (editListener);

    But editListener is not defined until after that, so with that statement, you're

    the listener of null changes.

    Put this line after you set your headset to changes.

    Also we say something "does not work", is not very useful.  If please do some debugging and tell us what he does not she should do this, rather than saying that it does not work.  Imagine that you took your car be fixed and told them that it did not work.  Would they be able to fix it?

  • Items from the drop-down list

    Is there a a way to get objects from the drop-down list to open the user clicking on the object itself (without using the button)?

    Look at this example of Niall:

    http://www.assuredynamics.com/index.php/portfolio/custom-dropdown-lists/

  • Select from the drop-down list and populate a list in another menu drop down

    I have a drop down list with 10 items in the list. If possible, would like for a selection in the drop-down list to populate a drop-down list with another list of selections. Each of the 10 points in the first list each will have a list of different options in the second drop-down list. I don't know how to build this solution.

    Thank you

    MDawn

    Hello

    It was because of the clear rawValue script that I put in the output from the drop-down list event businessFunction.

    I fixed it:

    // clear the current selection in the department dropdown
    dept0.rawValue = null;
    dept0.execEvent("exit");
    

    https://Acrobat.com/#d=MrWYQbTZIR7xJQDlm5ZSLg

    Good luck

    Niall

Maybe you are looking for

  • What is view comment in my preferences?

    I'm looking for in my preferences of ASC.  What does see comment in my preferences?  What is the difference in the flat and threaded?

  • How to remove multiple instances of a content type (jpeg) in the Options/Applications?

    You want to save a JPEG file on e-mail however do not get the option 'Open or save the file' when you click Download. When you check the list of Options/Applications/Content Type, Image JPEG appears twice and Action for one of those that cannot be ch

  • Photo printing

    The photos App in Yosemite iMac program, I would like to select and print 18 pictures on a "custom page" that fits on one A4 page in a specific order, mainly by date, but also to spend one or two photos selected within the same date, in order to make

  • Satellite Pro M10: IO error, cannot read DVDs/CDs, USB driver for Port Replicator

    I had to format my m10 pro like the multidrive dvd kept as an IO error and refuses to read my dvd/cd etc.I reloaded all software and the multidrive dvd (Panasonic coursc 810) will always return the same IO error.I have also continued to asked a USB d

  • Epson XP-600: print spooler

    I can print is no longer on my computer.  I get a message that Windows could not start the service on local computer print spooler.  When I try to restart the print spooler, I also get an error 1068: the dependency service or group could start.  All