Several drop-down lists with Switch statement

I use multiple drop-down list to help a user find that associate their correct sales based on the model and the part they use. However my "switch" statement will always be the case "default". Where am I evil scripts?

https://workspaces.Acrobat.com/?d=X2MirIocbNfyojw6QezAbA

the variable "part' requires a value." Add the script:

part = this.rawValue

SOnineThreenine.fxnineThreenine (part);

to the output of dropDownlist2 event. Otherwise, the variable "share" gives you an error message [object XFAObject] console

Tags: Adobe LiveCycle

Similar Questions

  • Several drop-down lists with the same content

    Hello my friends, I have several drop-down lists that are the same in content, I've added them all to each list drop-down I (30 PC), but now the size of the file becomes too large, so I was wondering is it possible to make only 1 from the list and use it in all my dropdowns?

    Specify: the list is only-text strings, nothing more. And the list should also be inside the shape (no external database)

    Help much appreciated, thanks: =)

    Alrighty then. The forum let me download files right now, so here's what to do using your example:

    1. In the hierarchy of the shape, right-click on the object 'form1' and select 'insert a Script object"in the menu.
    2. Rename the new object of script to 'Scripts '.
    3. Paste the following code in the Scripts object (it will not be an event to select):

    var ProductArray = new Array)

    "Product1 | 0127481 | 4 pcs | 1. 27,10 ",

    "Leader2 | 0127482 | 5 parts | 2. 28,20 ",

    "Product3 | 0127483 | 6 pcs | 3. 29,30 "

    );

    function PopulateProductDropdown (ddlList)

    {

    var numProducts = ProductArray.length;

    for (cnt var = 0; cnt)< numproducts;="" cnt++="">

    {

    ddlList.addItem (ProductArray [cnt]);

    }

    }

    4. in each of the drop-down list object Initialize event, paste the following code:

    Form1.variables.scripts.PopulateProductDropdown this);

    That's all.  You won't need to add list items to each of the drop-down list object, and you can remove those who came to see the first drop-down list.  Add all new products at ProductArray, by following the syntax of those here.  Make sure that you don't have a comma after the last one in the table.

  • I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. How can I fix?

    I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. Can I fix?

    I am fairly new to this, but I think it has to do with the way you have drop them downs named. Copy you a then keep stick in each area? If so, that's the problem. You must rename each with a different number: Dropdown1, Dropdown2, etc. I think this might solve the problem.

  • Populating drop-down list with SQL

    I have a database and I want to fill the drop-down list with a 'Group By' request to show the various categories without showing many of the same.  Here's the code I'm having difficult with:

    DropDown {
                    id: filterSelect
                    visible: true
                    enabled: {if (purchaseValue != false){false}}
                    bottomPadding: 20
                    title: qsTr("Category:") + Retranslate.onLanguageChanged
                    horizontalAlignment: HorizontalAlignment.Center
                    options: Option {
                        id: allOption
                        text: qsTr("All") + Retranslate.onLanguageChanged
                        selected: true
                    }
                    onSelectedOptionChanged: {
                        if(filterSelect.selectedOption == allOption){
                        _app.refreshObjects()
                        }
                        else{
                        dataSource.query = "select * from items where categoryfield LIKE '%"+ filterSelect.selectedOption.text+"%'"}
                    }
                    attachedObjects: [
                        ComponentDefinition {
                            id: optionFactory
                            Option {
    
                            }
                        }
                    ]
                    onCreationCompleted: {
    //                    "select categoryfield from items group by categoryfield"
                        var newOption = optionFactory.createObject()
                        newOption.text = 'Text to add' // or a variable fetched from data source
                        //newOption.otherfields = ...
                        filterSelect.add(newOption);
                    }
                }
    

    I have a data source that fills the listview, I want to use the same database to populate the drop-down list.  How should I go about this?  I tried to configure a different DataSource {} just for the dropdown menu, but I couldn't make it work.  In bold text, I am not clear as where I incorporate my SQL query against the newOption.text =

    TL; DR I try to use a SQL query to fill my menu drop-down using the same PB that is used for the listview.

    Any help will be appreciated and thanked!

    A friend by the name of Roger Leblanc http://appworld.blackberry.com/webstore/vendor/70290/?lang=en&countrycode=CA helped me and created a small code example to explain how it works.

    import bb.cascades 1.2
    import bb.data 1.0
    
    Page {
        Container {
            DropDown {
                id: dropdown
            }
            ListView {
                id: myListView
                dataModel: dataModel
                listItemComponents: [
                    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            title: ListItemData.categoryfield
                        }
                    } // end of ListItemComponent
                ]
            } // end of ListView
        }
    
        attachedObjects: [
            GroupDataModel {
                id: dataModel
            },
            DataSource {
                id: dataSource
    
                // Load the data from an SQL database, based on a specific query
                source: "asset:///pinguin.db"
                query: "select categoryfield from items group by categoryfield"
    
                onDataLoaded: {
                    // After the data is loaded, insert it into the data model
                    // This will populate the ListView. You don't want to show
                    // categoryfield in ListView, I just wanted to show the difference
                    // between populating a ListView and a DropDown
                    dataModel.insertList(data);
    
                    // Now, this will populate the DropDown by iterating through every
                    // data from the query and adding it one by one to the DropDown
                    // using the optionFactory Component Definition to add dynamically
                    // new Options to the DropDown
                    for (var i = 0; i < data.length; ++i)
                    {
                        // Create new Option
                        var newOption = optionFactory.createObject()
    
                        // Set the Option text to categoryfield
                        newOption.text = data[i].categoryfield
    
                        // Add the Option to DropDown
                        dropdown.add(newOption);
                    }
                }
            },
            ComponentDefinition {
                id: optionFactory
                Option {}
            }
    // end of DataSource
        ]
    
        onCreationCompleted: {
            // After the root Page is created, direct the data source to start
            // loading data
            dataSource.load();
        }
    }
    
  • Total responses of several drop-down lists

    Hello:

    I have a form that is a series of 14 questions.  Each question has a drop down list with 4 possible answers (Yes, no, n/a, unobserved).

    I need to show a total of responses (Yes, number no., etc.) at the end of the form.

    No real experience in the use of scripts, but eager to learn...

    Thank you!

    You may need to expand the scope of the conditional expression to include the table.

    Something like:

    this.rawValue=xfa.resolveNodes('Table.Row.[Cell1.rawValue=="1"]').length;
    

    It is not to see your exact hierarchy.

    Kyle

  • Populate drop-down list with the results of several drop-down lists

    Hi, I am creating a form where the results of two drop-down lists then would fill another drop-down list. I'm not new to javascript, but I'm new to using it in Acrobat, so while I found some answers to this: Drop-down list fill in multiple fields of text. I don't know where to implement this, if it is still the right thing, I'm looking for pipes for

    Oh and I use Acrobat Pro DC. Any help would be much appreciated!

    OK, you can create a function at the level of the document that is called in the Validate event of each of the two first drop down menus, something like:

    Function in JavaScript to the document level

    function updateDropdown() {}

    Get references to the drop-down menus of entry

    var F1 = getField ("DropdownList1");

    var F2 = getField ("DropdownList2");

    Refer to the output drop-down list

    F3 var = getField ("DropdownList3");

    Get the values of input field, as strings

    var s1 = event.target = f1? Event.value: f1.valueAsString;

    var s2 = event.target = f2? Event.value: f2.valueAsString;

    Fill the drop-down list of output with the elements, or deselect it if either input dropdown is 'empty' (single topic area)

    If (s1 = "" |) s2 === " ") {

    F3.clearItems ();

    } else {}

    F3.setItems (["", s1, s2]);

    }

    }

    In the two first downs Validate event, call this function like this:

    updateDropdown();

    You can of course name the function you want. More information about the properties and the methods used in the code are available in the Acrobat JavaScript documentation.

  • How to select several channels in the drop-down list for switching?

    Hello

    I use TS2015 SP1 and SwitchExec 2015. I created a list of routes that are now visible in the properties of the step "Activation" in the drop-down list field "Way (s) to connect".

    Here, I can click on an item in the list to select it.

    What can I do to select a second item in the drop-down list?

    It seems that I have to write the second element after the decimal point manually. Is this correct? Or y at - it something to select back in the menu drop-down?

    Thanks for help

    My bad!

    I wanted to say: «M2_C6R6 and M2_C7R7»

  • I have a drop down list with categories, how to close the categories?

    Hello

    I created the drop-down list categories and in each line, I'll choose a category in the menu dropdown.  How to add each category?

    It's the number 3.6.1 (2566), El Capitan

    That is to say.

    gas

    meal

    Rental

    I want to make the sum of all the lines that are "gas"?

    Use a drop-down menu the right way to do it?

    Thank you

    Edwin

    Hi Edwin,.

    Take a look at the personal Budget template in the template chooser > personal finance.

    SUMIF formulas are in the Budget sheet > summary by the table of categories > column C.

    The drop-down Menus (called context Menus in numbers) are in the leaf of Transactions > column C.

    Make sure spelling is accurate, or numbers will not find a match.

    Please call with questions.

    Kind regards

    Ian.

  • How to make the menu drop-down list with a scroll bar

    Hello

    I have a drop-down list that is filled with different table sizes.

    I have a size of 30-element array.  Some of the last items just go off the screen at the bottom of the Simulator PB.

    Is it possible for me to add a drop-down scroll bar?

    DP = new DropDown();
    dp.rowHeight = 24;
    DP.prompt = "stuff";
    DP. Height = 34;
    DP.width = 230;
    DP.x = TitleTB.x + 170;
    DP.y = Title.y-3;
    addChild (dp);

    Some of the tables look like this-

    case 'List 1':
    dp.rowCount = 2;
    for (var i: int = 0; i<2;>
    {
    if(i==0)
    {
    DPP.splice (0);
    DPP.unshift({label:"blahblah"});)
    }
    else if (i == 1) {}
    DPP.unshift({label:"foofoo"});)
    }
    }
    dp.dataProvider = new DataProvider (dpp);
    addChild (dp);
    break;

    case "List2":
    dp.rowCount = 30;
    for (var n: int = 0; n<30;>
    {
    if(n==0)
    {
    DPP.splice (0);
    DPP.unshift({label:"lalalala"});)
    }
    Else if (n == 1) {}

    **********

    Delete the existing table using splice (0);

    then I add the new array of labels.

    Before, when I didn't have the splice (0), I only had the .unshift () and sometimes got bays combined together and a scroll bar appears automatically in the Simulator.  But then the berries were mixed.

    Thanks for the help!

    Hey mlin13,

    from the looks of it, your property rowCount is set too high. the rowCount property represents the number of lines displayed on the screen when the drop down menu is open. so if the number of rows is less than the amount of items on the list, it will create a scroll bar with a drop-down list for you. try to set the number of lines to a default value of 10 and and keep it manipulate your list from there. and see if you get the desired results. Good luck!

  • Drop-down list with values outside field

    I tried to find how to feed external values to a field of ASD form drop-down list. It is not clear how we can link/partner an external source to the field.

    There is an article on how to regularly fill with external values, but I'm after a search in real time (for example find meeting locations available)

    Is this the values supported real-time search? If so, how can it be done?

    Check this post where his clearly explained how to create action and associate it with the presentation.

    Re: Decision tree for user input

  • Some way to make a drop-down list with dressing

    I is it possible to make a drop-down list contains a long sentence and when you select the sentence, he trained actually phrase to encapsulate in a multi-line text box?  I seem to be able to enter a fairly long series of words in the drop-down list, but when you make a selection of the text encapsulates not and the right edge of the field cost overruns.  If this can be done is a way of pre-existing reference somewhere else comments hidden in the shape and align them on the field with the selection list?

    I think that this is a limitation in the LC Designer. However, you get the sentence on mouse hover.

  • Several drop-down list selection

    I am newbie on OBIEE. I have a dashboard that has a prompt of commands and a report. On the command prompt, I need supplier a selection to multiple address drop-down list. So I clicked on the available column in the left columns. And I put the control as a multiple selection. When I run the report, the pop-up multiple selection works very well but the result of the report do not seem to take into account what I choose in the multiple selection box. What should I do on the side of the report. I have add this column in the filter and is invited...

    Please notify.

    Hey,.

    To reflect the columns in the report. You must invite these columns in your reports.

    For EXAMPLE: You have created a guest 'Éducation' and gave
    Operator: equivalent in
    Control: Multi Select
    Show: All values (do not check limit here)
    Default: the default values report.

    Save the prompt.

    Now, you have created a report with education, region, Distrinct, column etc...
    In the filter (section Education Say is invited)

    Then, the command prompt will be reflected in the report.

    -If your problem is resolved, Reward Points and close the thread as an answer to help others :)

    Published by: 831909 on March 23, 2012 07:35

  • Barcode 1 d dynamic of several drop-down lists

    I worked on it for a while and I can't do things. I am using formcalc. I have a dynamic PDF form, I created with two drop-down lists. A drop-down list has elements such as the 'new' or 'Used' and the second drop-down list has a price list, such as "99 ¢ ' or '$ 1.99', etc. At the bottom of the form, there is an element of code 128 barcode barcode which is the value calculated - read-only. I am trying to use logic to combine both, where if you have selected 'New' and ' 99 ¢ "would that be the rawvalue of the code bars"NEW1"or something in that sense.

    Here's what I have so far:

    TopmostSubform.Page1.Shape.DropDownList1::calculate - (FormCalc, client)

    If (DropDownList1.value == "New" and DropDownList2.value is "99 cents") then BarCode1.rawValue == "NEW1" endif

    What I'm missing here?

    Please check the update below code.

    If (DropDownList1.value == "New" and DropDownList2.value is "99 cents") then BarCode1.rawValue == "NEW1" endif

    Update: if (DropDownList1. rawValue == 'NEW' and DropDownList2. ( rawValue == '99') then Code128BarCode1.rawValue = "Nouvelle1" endif

    the changes are highlighted and another is: BarCode1.rawValue = "Nouvelle1" ('is' not two 'is'. Two eqals 'is' for the purposes of comparison only, no assignment)

    -Rambeau.

  • Populating a drop-down list with the entities

    I do screens, and I would like the user to choose one of the various entity instances 'establishment' as their institution in a zone drop-down list.

    I know I could do this statically simply adding values in the list in the screen of the issue, or by putting values into a file .xml and power OPA the name of the .xml file.

    I want to do, however, is to have this drop drop-down filled running with features created by the user running (collected on a previous screen). I think there is no way to do so; am I missing something?

    This can be done quite easily using a plugin from list provider. More information in the developer help in Web Extensions determinations | Provider from the list

  • Prepopulate the drop-down lists with xml file

    Hello world

    I'm trying to prepopulate a dropdown list using an xml file. There are many tutorials on the internet that allows me to do from the overview of the Designer tab. However, when I did it worked well, but I am not able to 'embed' the xml file so that the values appear in the workspace when the user starts a process.

    I tried to load the xml file with the contents of resource reading in the action profile of the first task and put the result in the "xmlPrepareData" but the problem is that I can't put all the values of the xmlPrepareData after because the xml model is not exactly the one used by LiveCycle.

    Any thoughts? Someone is already managed to prepopulate a dropdown list with an XML within the process?

    Kind regards

    Thomas

    OK gr8...

    Assuming you're able to get the XML process LC to your XDP/PDF form field.

    You can fix the XML from the drop-down under-

    clear the drop-down list box
    * DROPDOWN_Field.clearItems ();

    choiceList = XMLData.parse (* XML_Field.rawValue, false);

    divide the choiceList in an array of values

    choice = choiceList.resolveNodes("root.element[*].*NODENAME");

    var numchoices = choices.length;

    Adds an array of values in drop-down list
    for (var i = 0; i)< numchoices;="">

    {
    * DROPDOWN_Field.addItem (choices.item (i) .value);
    }

    * DROPDOWN_Field - is your field drop-down list.

    * XML_Field - is your XML data stored in a TextField.

    * NODENAME - is the name of the node in your XML to solve.

    I hope that Hepls...

    Regards-

    Chalukya.

Maybe you are looking for

  • What memory card for computer mac laptop

    I would like to increase the memory of my computer mac laptop.  How can I have one bought and installed?

  • WLAN

    I have a HP Pavilion p6206uk desktop computer. Y at - it a wireless network adapter installed and if so how do I enter it?

  • T60 processor upgrade

    Can someone check if this "processor Intel E8400 Core 2 Duo - 3.00 GHz, 6MB L2 Cache, 1333 MHz FSB, Socket LGA775" processor is compatible with the T60?

  • HP B110a: HP B110a only complete scans

    I can't scan using HP Scanning (in fact, IrfanView + HP TWAIN, that "triggers" the scanning HP SW). The search starts but it "hangs" showing "half-page" scanned. The only way to 'close' the process is to "kill" the tasks through the Task Manager. My

  • * all on my computer expanded *.

    all fonts as well as all the icons have expanded, and I have no idea how to do to return to the normal size. can someone please advise were I'm going there to remedy?