Populate a dropdown based on selected in another dropdown in a seperate table

Good Day All;
This may sound like a simple question to most, but… It has had me frustrated trying to figure out.
I am trying to populate a dropdown based on what is selected in another dropdown.
Let me explain what I have done so far.
LifeCycle Designer 8.05.2
When I had both dropdowns in the same table, I did not have a problem. The code I used is
Table name is “Table1”
if(directorate.rawValue == "1")
division.clearItems();
division.addItem("select")
I was asked to move things around and now “division” is located in “Table2”
I know I need to reference “Table1” but I am running into a Syntax error. I have tried the following code;
if(Table1 Row1 directorate.rawValue == "1")
division.clearItems();
division.addItem("Faire un choix")
if(Table1.Row1.directorate.rawValue == "1")
division.clearItems();
division.addItem("Faire un choix")
Any help would be appreciated
Chomp

You're missing a semicolon at the end of the addItem line, and on the second code sample you've got no periods in the SOM reference (Table1 Row1 directorate). 
The easiest way to get the path to another field is to ctrl-click on the field while you are in the script editor.

Similar Messages

  • Field Populates based on Selection in Another Field

    Hi everyone,
    I have created a new position description template using a pdf form. In this form I have various fields. I would like to populate one field based on what I have selected in another field. For example, I have a field called competency. In this field I can select and choose a competency. If I select "Accountability" I would like the description field to say " Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. " alternatively if I select "Compliance" I would like the description field to say "Complies with policies, procedures, workflows and instructions." Can anyone assist me with script or is there another way of making this happen.
    Thanks in advance

    I think this is what you are looking for:
    Make sure that you select "Commit selected value immediately" in the options tab of the drop down menu.
    //Place this script in the custom validation script of the drop down menu
    //Create a text field caleld Text2
    var MySelection = event.value;
    switch (MySelection) {
    case "Accountability":
        this.getField("Text2").value = "Accepts personal responsibility for the quality and timeliness of work. Can be relied upon to achieve results with little need for supervision. ";   
    break;
      case "Compliance":
        this.getField("Text2").value = "Complies with policies, procedures, workflows and instructions.";
        break;
    I hope this helps.

  • How to Populate a Dropdown field for a table control with different keys

    Hi All,
    I have Table control with abt eight columns (fields). Out of these eight field one field is with dropdown list. In table control Project ID is Primary key column. Depending upon this Project ID value, i have different values which is to be populated in dropdown boxes. In table control if there is only one project ID value say 'P000715' i can populate it but when i have more than one project ID (P000715, p000716, P000717.....) in display in rows of table control i want to have different values in my dropdown field corresponding to that row of project id. Experts please tell me how to achieve this functionality.
    Thankx in Advance
    Rizwan Ahmad Siddiqui

    The only way you may be able to do this is using
    MODULE PROCESS ON VALUE-REQUEST. User-programmer F4 help
    in your PAI routine.
    In this routine you would build the list and get the returned value to update the field.
    Something like this.
      DATA: BEGIN OF value_tab OCCURS 0,
        field1 TYPE zlmltype,
        field2 TYPE zltypex,
      END OF value_tab.
    * Drop down values
      REFRESH it_return_tab. CLEAR it_return_tab.
      REFRESH value_tab. CLEAR value_tab.
      SELECT ltype ltypex
        INTO TABLE value_tab
        FROM zlmltyp
        WHERE auth NE '9'.    "System Only
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield   = 'FIELD1'
                value_org  = 'S'
           TABLES
                value_tab  = value_tab[]
                return_tab = it_return_tab.
      READ TABLE it_return_tab INDEX 1 INTO wa_return_tab.
      CHECK sy-subrc EQ 0.
      p_pleadtyp = wa_return_tab-fieldval.

  • Populate field based on selection from another field?

    I'm using a Data Connection with a SQL query that returns two fields (StNameFull and ADDRKEY). I have a drop-down list called "Address" with the list items dynamically bound to StNameFull, so the user can select the address.
    What I'm trying to do is populate the second field "Key" with the corresponding record, based on the selection made from the drop-down list.
    Is it possible to script this so that when the Address is selected the Key will automatically fill in with the key that matches the address selcted?
    I currently have "Key" as a text field bound to ADDRKEY, but not sure how to have it check what was selected in "Address"
    Thanks so much,
    - Kevin

    Yes it is possible but you will have to write some script to do it. You wil also have to ge the DataConenction to execute a SQL statement. There is a good blog on this topic at this location:
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    Paul

  • Populate one Autocomplete box on selection of another in DataGrid

    I have 2 Auto complete box inside Editable DataGrid. first for 'Type' second for 'Subtype'.  I need to populate the corresponding subtypes on the selection of Type in any row of DataGrid.
    If I have 2 subtypes with same name in 2 different types then on selection of subtypes system shows only first selected type in both the 'Type' Auto complete box.
    Please guide me to resolve the issue.

    Hi Mahendra
    Please go through the below link for your answer.
    Creating Cascading Drop Down Lists in Visual Studio LightSwitch
    HTH
    Regards
    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com
    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

  • Clearing Value in one Prompt based on selection in another

    Hello,
    I have 2 prompts in my BEx query designer for same characterstics ( one is single value, characterstic variable and another one is Hierarchy node variable ). During the query execution,  If user selects a value in first prompt and goes to the other prompt and selects a value, i need to clear the selected value in the first prompt. And vice versa as well.....
    Please suggest.

    Jagan,
    Let me explain my isue in detail...
    I have created 2 variables for the same characterstics and both of them are ready for input. One variable is of characterstic type and other is Hierarchy node type.
    Now, when user executes the query he sees two prompts. Lets say user selects a value for one prompt and then goes to second prompt and selects another value for the second prompt, then i need to clear the values that was selected by him for the first prompt. And vice versa....

  • Pre-Populate Dropdown based on information selected in another dropdown

    Hello,
    I hope this make since. I am working on building a form using Adobe Livecycle Designer. I have a dropdown list in multiple fields on the same form that will have the same information selected. I want the additional fields to automatically populate the information a user selects in the first dropdown list. Is this possible ??? If so, what would be the script/code necessary to do so ??? Thank you for your help.
    Example
    City, State appears in 4 different fields based on the selection in field 1, the additional 3 fields auto-populates the same information.
    Field/List 1: New York, NY <-- Selected City, State
    Field/List 2: New York, NY <-- Auto Populated based on field 1
    Field/List 3: New York, NY <-- Auto Populated based on field 1
    Field/List 4: New York, NY <-- Auto Populated based on field 1

    In the exit event of the first State field, using Javascript, something like this should work:
    State2.rawValue = this.rawValue;
    State3.rawValue = this.rawValue;
    State4.rawValue = this.rawValue;
    ...where "State2", "State3", etc. are references to the other dropdowns you want to populate with the same information from the first state field.
    Be sure to set the binding values in the BINDING tab of the dropdowns to the same in each dropdown,
    Brian

  • Populate elements in a drop based on selection made in another drop down

    i need to populate elements in a drop based on selection made in another drop down list. have created list models for populating data from R3. I am using PDK for java development.

    hi,
    to populate the second dropdown from the selection of the first u need to the submit the form on the selection of data from dropdown and based on the selection populate the second dropdown.
    If using jspDynpage u can submit the form on the  ''onChange" event of first drop down.
    If you can let us know what type of application is this i think we can help you in more better way.
    Thanks
    Ritushree Saha

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • Auto populate Infopath 2013 fields after selecting a specific dropdown option.

    Auto populate Infopath 2013 fields after selecting a specific dropdown option.
    Hi.
    I have a Sharepoint 2013 list with three fields. Code, Section and Sub Section.
    I would like to be able to have the form autopopulate the Section and Sub Section fields when a value for code is entered.
    How would I go about this please?
    Thanks
    Jon

    Hi JonMorgan,
    Based on your description, my understanding is that you want to achieve that the second dropdown gets populated depending on what the first dropdown is set to.
    To achieve your requirement, creating cascading dropdown fields with InfoPath.
    Please refer to the following links about cascade drop down in InfoPath form:
    http://msreddysharepoint.blogspot.in/2012/12/infopath-2013-web-browser-creating.html
    http://www.pointbeyond.com/2011/11/20/cascading-dropdowns-in-infopath-2010/
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • How to populate the values based on different selections in Dashboard Promp

    Hi,
    I have a group prompt, which has 2 drop downs. The DropDown1 decides the values of DropDown2.
    I have used a SQL query in the "Show" values which will populate the dropdowns.
    When a value is 'selected" from DropDown1, the selected value decided the values of DropDown2 which is again a SQL query.
    But I see that when a new value is selected from DropDown1, the values in DropDown2 will not change until I click on GO.Even after clicking GO, the previously selcted value is retained.
    As an illustration:
    animals,plants are the choices in the first drop down, which if, animal is selected would populate the dropdown2 with cow,sheep, tiger.
    Assume animal is selected. The second drop down now is populated with cow,sheep and tiger. Assume you chose sheep.This resulted in display of sheep related info on the BI page.
    Now if I go back to the first dropdown and select plants, I would expect the second drop down to be populated with fig, palm, coconut.
    However in my case I see only the proviously popluated animals in the DropDown2.
    If I click on Go, I see that the DropDown2 is populated with Sheep,,fig, palm, coconut. Ideally I should not have seen the prevously selected value in DropDown2.
    Here there are 2 problems stated for a group promt having 2 DropDowns where item chosen from one decides the values of the other dropdown
    1. On selecting an item from DropDown1, is not populating with the corresponding values in DropDown2
    2. When 'Go' is clicked, DropDown2 is populated with the corresponding values for DropDown1 + the previously selected value in DropDown2 is retained.
    Any input to get out of this problem will help
    thanks
    Shubha

    Hi
    I am using group prompt and has 4 drop downs.
    Value of one decides the other. Values for the dropdowns will be populated by SQL results.
    'Constrain' will not be available for sql results..
    How to go about this?
    thanks
    Shubha

  • Cond display of drop down based on value selected in another drop down form

    Hi,
    I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
    Currently I have 2 drop downs.
    First drop down is a list of Jacks from 2000 to 4999...
    Second Drop down consists Chassis ranging from 1 to 900..
    So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
    when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
    and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
    Can someone please provide me pointers on how to do this..
    Thanks,
    Nehal

    Hi Larry,
    Thanks for your response..
    Here are the queries for my select lists.
    P62_JACK
    select list query for Jacks:
    select JACK_NUM display_value, JACK_NUM return_value
    from CTS_LIST_OF_JACKS
    order by 1
    P62_CHASSIS_BLADE_PORT
    select NETWORKPORT display_value, NETWORKPORT return_value
    from CTS_LIST_OF_NETWORKPORTS
    order by NETWORKPORT_ID
    jacks range from 2000 to 4000
    chassis_blade_port ranges from 100 to 900...
    Can you please let me know how to do it..
    Thanks,
    Nehal

  • How to populate one dropdown on select of other dropdown in a table

    Hi
    My requirement is that I want to populate one dropdown on selection of some value in other drop down.The two dropdown are present in two columns of a Table.
    Can any body help for the same.
    Regards
    Nitin

    Hi,
    Try This
    Bind "enable" properties of Both DD1 and DD2 to
    context attributes of type boolean. DD1Enable,DD2Enable
    1: set their value to false intially 
      wdContext.currentContextElement.setDD1Enable(false);
      wdContext.currentContextElement.setDD2Enable(false);
      Bind the selected property of the table to a
      Context attribute of type boolean(Initially false), say "selected"
    2: Then use check box in the table to get current lead selection
      write in "onToggle" action  of checkBox
    int len=wdContext.nodeTable().size();
    for(int i=0;i<len;i++)
             if(wdContext.currentTableElement().getSelected()==true)
                 wdContext.currentDD1Element().setDD1Enabled(true);
                 wdContext.currentDD2Element().setDD2Enabled(true);
             }else
         wdContext.currentDD1Element().setCountryEnabled(false);
         wdContext.currentDD2Element().setStateEnabled(false);
    This is how u get leadselection and able to change particular row in the table
    Regards
    Lakshmi

Maybe you are looking for

  • Purchase Group - Purchase Executive

    Hi, Each Purchase Group has 3 executives.  when PR is generated it will generate for PG only,  Here the requirement is after creating the PR, based on Purchase Group, he will assign to the respective executive for further processing.  How can it be m

  • Problem in selection criteria

    Hi folks,   In my report i have five selections screen feilds.for each selection i have different selection criteria.for each selection -criteria i have to  write seprate code.if i select first feild i want that selection criteria only.if i select se

  • SAP ERP - Business Process Flow

    Hi all, can you help me in finding business process diagrams for each SAP ERP module? (es. SD/MM etc...) Thanks in advance

  • Need details about Statistics - Internals

    Hi, I am aware of Statistics and how it helps CBO. I would like to know more about internals of Statistics, I know Oracle maintains certain details in the below views, also in Columns and Partitions Metadata views. DBA_TABLES DBA_TAB_STATISTICS DBA_I

  • I lost the desktop on my screen, now only two icons

    i lost the desktop on my monitor. now only two icons upper right. my mac book pro desktop is ok help please