Binding Drop Down Lists

Hello,
I am trying to figure out how i can bind drop down lists. I want it so if you choose a certain selection in drop down list 1, then you are only able to pick a certain selection out of drop down 2. So basically each selection in drop down 1 will give you different options to select in drop down 2. Sorry if i made that really confusing. Thanks
-Aaron-

Hi,
Here is a mock-up version of the spreadsheet.
The first dropdown has the nine categories set in the Object / Field tab. Also have a look in the Object / Binding tab as there are values specified for each of the nine categories. These will be used later in the script.
The second dropdown does not have any values specified in the Object / Field tab.
Instead there is script in the exit event of the first dropdown. This is a switch statement that first of all looks at the bound value ("9030") of the choice that the user has made ("9030 National Marketing"). The statement then looks at each case until it gets to one that matches; then it runs the script for that case and then breaks from the switch statement.
Each case starts off with:
DropDownList2.clearItems();
DropDownList2.rawValue = null;
This is important because this clears the list in dropdown2 and sets its value to null. These two lines are then followed by a series of addItem() script which goes through all of the types in that category.
I have scripted all of 9030 and the first five lines of 9031. This should get you out of the traps. It is a bit of a pain, but just copy and paste downwards.
Each case ends with a "break;" and the last "}" closes the switch statement.
Good luck,
Niall

Similar Messages

  • Drop-down list - Global binding to addInstance of new row in Table

    Global binding - from drop-down list selection to addInstance of a new row and auto-populate the first cell of the row. Can it be done, and if so, how? Thank you.

    Me again. I also need this same functionality when the form user enters data into a text field - addInstance of a new row and auto-populate the first cell of the row. I'm assuming the same functionality? Thank you again.

  • Displaying value only in Drop Down List

    Greetings,
    I have a drop down list with value:text as follows:
    01:Daylight
    02:Dusk
    03:Dawn
    04:Night
    I would like to present the user who clicks on the drop down list with all of the literal text options (daylight, night, etc), but once selected, the object populate and print only the value (01, 02, etc).
    I thought about resizing the object when the user clicks on it, and then resizing it back once selected, but this seems rather cumbersome.  Space on the printed form is very limited, which is why the value/codes are used to represent the actual literal options.
    Any methods or ideas would be greatly welcome
    Thanks!
    Brad

    Here is a sample that shows what I think you want. I have a TextField that is displayed. When the user enters the field, I hide this field and make a DDlist available to the user. This DDList is placed behind the TextField and is hidden (not part of the layout) until the user enters the TextField. I also hide the TextField (this code is on the Enter event of the TextField). Now that the DDlist is visible you can set up a DDList to display one thing but report another. This is what I did (look at the binding tab of the DDList). Now when the user selects an item from the DDList the TextField is updated, the DDList is hidden and the TextField is made visisble, then the cursor is placed in the next field. This code is on the Exit event of the DDList.
    Is this what you were trying to accomplish?
    Paul

  • Populate a drop down list with data from Excel and fill in a text field, based on drop down selectio

    Hi!
    I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.
    How to do this is described by Stefan Cameron here:
    http://forms.stefcameron.com/2006/07/29/dynamic-properties/
    There's a snag, though, and to describe it more clearly:
    The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!
    But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.
    If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.
    I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.
    Any suggestions appreciated!

    Although your issue is far beyond mine, I was hoping you can help me out.....
    I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.
    Please let me know the steps I need to do.  I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.
    Thank you

  • BUG: Sorting drop-down lists from the field tab when using "specify item values"

    Hi all,
    I've finished creating my form now, but I came across this whilst writing up my documentation for maintenance tasks.
    This occurs when adding new values to a drop-down list that has the "Specify item values" checkbox in the binding tab checked.
    When I then try to sort my list using the built in sort buttons, it will sort the items, but the list of specified values in the binding tab does not sort reorder to stay with the original items in the list.  This is hapenning when I sort from the Object > Field tab.  If I sort in the Object > Binding tab then the sort will include the specified values.
    For example:
    A    5
    C    2
    D    9
    Add a new value to get:
    A    5
    C    2
    D    9
    B    10
    Sort the list using the button:
    A    5
    B    2
    C    9
    D    10
    But it should be:
    A     5
    B     10
    C     2
    D     9

    I was able to duplicate this problem and it looks like a possible bug.  I've submitted it to support.

  • How can I make a bound drop-down list using OAF?

    Please note, this is for OAF. I am aware of the support in ADF.
    I'm sorry this is such a basic question, but I've been trying for days, and I can't think of anywhere else to look for an answer.
    I need a simple drop-down list, not a search. This particular list only has 10 or so items. It is based on a view containing a code value, and a description. I need all descriptions to be available at all times. Just click the arrow, and the entire list is displayed. When the user selects an entry, the code associated with the discription populates a bound attribute. Ideally, when the page is instantiated, the code value controls the text value visible in the collapsed drop-down list. Visually, it would be similar to an html <select> element.
    Can someone please tell me how I can produce such a simple thing, or point me to some documentation?
    Thank you.

    Thank you for the excellent reference Peddi. I had played with the OAMessageChoiceBean component yesterday, but I was able to tell from your instructions that "Picklist Display Attribute" and "Picklist Value Attribute" really are not for binding to the database EO. That was the key piece of information that had me confused.
    In addition to adding the messageChoice component to the page, I needed to write some code to synchronize the picklist value with the corresponding code value, which I placed in am OAFormValueBean (hidden form field) which I could then bind to my application's database EO in the controller, running in the processFormRequest procedure:
    /** Synchronize the catalog code with the selected catalog name */
    protected void syncCatalogValues(OAPageContext pageContext,
    OAWebBean webBean, MyApplicationAMImpl am) {   
    OAMessageChoiceBean mcb =
    (OAMessageChoiceBean) webBean.findChildRecursive("CatalogName");
    OAFormValueBean cc =
    (OAFormValueBean) webBean.findChildRecursive("CatalogCode");
    String catalogDescription = mcb.getText(pageContext);
    if (catalogDescription != null) {
    String catalogCode = am.getCatalogCode(catalogDescription);
    cc.setValue(pageContext, catalogCode);
    Along with a little code to get the catalogCode value from the LOVVO, that's all it took.
    Thanks again. This was a great help.
    Pete

  • How to get drop down list  display values

    I have binded my drop down list with tabledataprovider. In the value field i have given customer id and in display field i have given customer name.
    I have reatrived cust id but
    how to reatrieve customer name.

    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=56515
    Also, if your dropdown list is bound to a data provider you can use something like this:
    RowKey rowkey = tripDataProvider.findFirst("PERSON.PERSONID", dropDown1.getSelected());
    String displayValue = (String)tripDataProvider.getValue("PERSON.NAME", rowkey);

  • The portlet name is not displayed in the portlet drop down list ?

    Hi,
    I use Sun Java System Portal Server 6 2005Q4 for windows 2000 server , use the following command to deployo portlet,
    I am not sure if I successfully deploy the portlet?
    pdeploy deploy -u amAdmin -w amadmin -p amadmin -d "cn=amldapuser,ou=DSAME Users,dc=icheng,dc=com" C:\Sun\PortalServer\tmp\portlet\portletsamples.war
    The message I got after execute the pdeploy command is =>
    Deploys the portlet war file and inserts the provider into display profile..
    OPTIONS
    --help Help message (false)
    -u --runasdn UID Bind DN (none)
    -w --password Password (none)
    -p --wc_password Password for WebContainer's Admin (none)
    -i --instance WebContainer's Instance into which the war file is to be deploye
    d (*)
    -d --dn LDAP DN of the target node (*)
    -g --global Global display profile (false)
    -r --rolesfile File containing the DSAME and portlet role mapping (*)
    -f --userinfofile File containing the user info mapping (*)
    -v --verbose Generate debug messages (false)
    -V --version Generate version information (false)
    -l --locale Locale information (en_US)
    OPERAND
    Specifies a path to the war location.
    Deploying to IWS
    Is this mean that successfully deploy the portlet ?
    After I deploy the portlet, I login to Access Manager, select the "service" from view, click the portal desktop,
    click "Manage Channels and Containers", click the "New Portlet Channel...", then click the portlet drop down list,
    the portlet name is not displayed in the portlet list.
    How can I make the portlet name displayed in the portlet drop down list ?
    Can someone help me ?
    Thanks!

    Hi
    According to your description, since this is SQL Server forum, as Olaf Helper’s post, could you get the correct result if you execute the following query in SQL Server Manager Studio (SSMS)?
    select UserName from aspnet_Users where UserId in(select FreindId from myFreinds where UserId in(select UserId from aspnet_Users where UserName = '<your typed name>'))
    If you cannot get the correct result in SSMS, I recommend to check the Transact-SQL statement. Apart from the error message, we also need to know the table structure, data, join relationships between tables for further analysis.
    However if there is no problem in SQL Server query, it will be an issue that regards ASP.NET and website deployment. I suggest you to post the question in the ASP.NET forums at
    http://forums.asp.net/ . It is appropriate and more experts will assist you.
    In addition, there is detail about listbox control in asp.net. You can review the following links:
    How to Bind/Load/Fill ListBox with Sql Server Database in asp.net:http://www.webcodeexpert.com/2013/07/how-to-bindloadfill-listbox-with-sql.html#.U5f75_6KCM9
    How to get multiple selected value in ListBox control - ASP.NET using C#:
    http://www.dotnetfox.com/articles/how-to-get-multiple-selected-value-in-listbox-control-Asp-Net-using-C-Sharp-1047.aspx
    Thanks
    Lydia Zhang

  • Adf drop down list in adf  table

    hi all
    i m trying to create a data table that have a column on it as drop down list ,the list get the value good as bind variable passed to it and work good when create a new record but when i try to update the record
    always get this error
    <Utils><buildFacesMessage> ADF: Adding the following JSF error message: java.lang.ArrayIndexOutOfBoundsException
    oracle.jbo.JboException: JBO-29000: java.lang.ArrayIndexOutOfBoundsException
    and when i try to print the value of the list it print the index not the value
    when i change it(the drop down list) to lis of value LOV it didnt git any record in the LOV
    my code is :
    <af:column headerText="#{bindings.DeptLabView3.hints.CntPc.label}"
    id="c4">
    <af:selectOneChoice value="#{row.bindings.CntPc.inputValue}"
    label="#{row.bindings.CntPc.label}"
    required="#{bindings.DeptLabView3.hints.CntPc.mandatory}"
    shortDesc="#{bindings.DeptLabView3.hints.CntPc.tooltip}"
    id="soc3">
    <f:selectItems value="#{row.bindings.CntPc.items}"
    id="si4"/>
    </af:selectOneChoice>
    </af:column>
    please any one help
    Edited by: user554540 on 20/02/2010 08:50 ص

    Hi,
    I would like to use selectOneChoice in af:table, but i've got error: "java.lang.ArrayIndexOutOfBoundsException, msg=0"
    Can u send me an example for using selectOneChoice in af:table?
    Thanks,
    J.
    <af:column headerText="#{bindings.viewTsheets1.hints.ProjectId.label}"
    id="c8">
    <af:selectOneChoice value="#{row.bindings.ProjectId.inputValue}"
    label="#{row.bindings.ProjectId.label}"
    required="#{bindings.viewTsheets1.hints.ProjectId.mandatory}"
    shortDesc="#{bindings.viewTsheets1.hints.ProjectId.tooltip}"
    id="soc2">
    <f:selectItems value="#{row.bindings.ProjectId.items}"
    id="si2"/>
    </af:selectOneChoice>
    </af:column>
    -----------------------------------------------------------------------------------------------------------------------------------------------------------

  • Populating Drop-down List in Interactive Forms for Java

    Hi,all
    I need to populate a drop-down list in Interactive Form.
    I tried to do it by using Dynamic Properties of the drop-down
    list,but didn't give nothing.At the same time I have successfully
    populated a simple drop-down list(on webdynpro view),which I
    replaced near my InteractiveForm.
    What may be the problem?
    Regards,
    Michael

    Use the DDL from the Web Dynpro pallette. Bind the same/ similar attribute of the DDL you used in the web Dynpro view in the interactive form also... this should work..
    Thanks and Regards,
    Anto.

  • Populateing a drop down list in a repeating sub form

    I have been using the scripts from the Purchase Order sample that work with the Country and States/Provinces drop down lists and have modified them to fit my needs. The scripts work great. However I have a drop down list that is in a repeating sub form and the only the drop down list in the first occurance of the sub form works. The others don't.
    I put this line of code in a field called drpOrderedByTeam.
    JobsScript.getJobsOther(xfa, xfa.resolveNode("form1.TimeSheetSF.DetailsSF[*].DetailsTable.DetailsRow.ItemNumber"));
    I thought I just needed to add an "[*]" to the name of the sub form and it would work with all occurances but it doesn't seem so and I'm not sure what else to do.

    Based on your explanations, I've attempted to re-create your form and I think I've got it working the way you'd like it to.
    There are some difficulties with using fields in table headers which are replicated on subsequent pages because while new instances of the header subform and the fields it contains are created, you don't have access to these instances using the header's Instance Manager (I think this is a bug but I'm not sure). This means that you can't iterate through the instances of the header in order to populate the task lists depending on the selection in the team list. One solution for this is to make all header fields Global (select each field and, in the Object palette's Binding tab, set the
    Default Binding property to
    Global). This means that all instances of these fields will share the same value. The effect is that when you change the value of a field on an instance of a header on any page, the change will be replicated on all instances on all pages. The catch, though, is when you use lists in the header. Making list fields global doesn't mean that their item lists are global -- which causes other headaches.
    In the end, because of the problems I've described, I had to resort to cheating a little but if you think about it, it's not really cheating. What the form does is whenever the team list value changes, it removes all instances of the DetailsSF rows. This has the effect of also removing all instances of the DetailTitlesSF headers accross the current page set (and removes all pages but the first one). Then 6 new instances of the DetailsSF row are generated and the DetailTitlesSF header is re-populated using the new selection in the team list. After that, if a new page gets generated because of the number of instances of the DetailsSF rows, the new instances of the task lists in the new instances of the DetailTitlesSF header will have the correct list of items based on the current value of the team list. In the end, even though I'm cheating by removing all instances of the DetailsSF row in order to reset the lists in the DetailTitlesSF header, it's not really cheating because if you change teams, then it should be assumed that all data entered doesn't apply anymore because the tasks change as well... Convinced?
    The best way to understand this is to check-out the sample form.
    Let me know if you have any questions.
    Stefan
    Adobe Systems

  • Dynamic Drop-Down list in a table row or subform

    Hi,
    I need to display multiple drop-down list elements dynamically. Each of these DDLs will have different values.
    For example:
    The table will have 2 columns (Student Name text field and Courses drop-down)
    Row 1: Student 1 & Courses of Student1 in DDL
    Row 2: Student 2 & Courses of Student2 in DDL
    When I execute my app, both the drop-downs (i.e. for both the students) are displaying all the courses of all the students. I tried a lot with binding options..
    $record.Students[].Courses[]
    is refering to all elements of the node. If I use the index 0 for Students node, I am getting 1st element rows.. if I use 1, I am getting 2nd element rows,,,
    But How can I set the binding so that Row 1 has only Student 1 courses and Row 2 has Student 2 courses?
    IS THERE A WAY TO DYNAMICALLY SET THE BINDING USING JAVASCRIPT?
    I tried with tables, subforms.. it is not working. It is working fine in plain web dynpro table but not in an interactive form. I am using NW 2004s SP11, Web Dynpro Java. LiveCycle Designer 7.1, Adobe Reader 7.09.
    There are some other posts talking about similar issue.. I tried the solutions mentioned there as well, but nothing worked.
    I would really appreciate if any one can provide a solution or pointer to my problem.
    Thanks
    Ram

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • Drop-Down List in interactiveForm

    Hello everybody
    I've just started using interactiveForm and I've a little doubt, I've a drop-down list linked to a node of the context.
    I would like to bind an action on the selection of the drop-down list that must update another field/context element.
    I explain better:
    I ve a list of values/points
    A 2
    B 1
    C 3
    etc..
    in my list I must have A/B/C
    I've a field "points"
    When I select A , point must be updated to "2"
    When I select B , point must be updated to "1"
    Is it possible? how? I'm looking on documentation but I'm not able to find the binding with an action.
    Thank you,
    Serena

    yes, but I wasn't able to pass throught the onCheck.
    I try to explain better.
    I've the drop down list, with some values.
    I've bind the onCheck of my form with an action so in the property of the form I've:
    EVENT
    property: onCheck value: checkType
    and in my code the method
    public void onActioncheckType(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    that just print a screen message.
    Now when I change the value in my dropDown, I don't have the message so I think I miss a point: how to tell the dropdown to call the onCheck when I change the value.

  • Drop Down List not getting populated

    Dear All,
    I have developed a form in SFP which containes a drop down list.The drop down list is to be populated by an internal table field.
    Whenever I am executing the form i can see only the first item in the drop down listand nothing else.
    While debugging i could see the almost 15 entries in the internal table.
    I have mapped a field of this internal table to the drop down list.I am unable to figure out the problem....do let me know which type of drop down list should i use for this scenario....I even tried with java script...but nothing works for me...do let me know??
    Waiting for t
    Regards,
    Geet

    hi,
    i guess you have bound the field but not the list elements of the field.
    the content of the field (as result of the selection from the drop down list box) can be bound to a variable.
    But if you want to display your internal table as entries in your drop down list box you have to do some dynamic data binding of the list elements.
    to be able to do this, you first have to activate dynamic data binding in general. Use the way i proposed (--> extras from the toolbar!, options, data binding, dynamic). then the word "list elements" in the object palette of your dropdown list box will be green and you will be able to do some dynami data binding!
    i recommend you this one:
    --> http://www.adobe.com/devnet/livecycle/articles/strategies_creating_forms_lc_designer8/strategies_for_creating_form_designs_using_designer8.pdf
    br
    norbert

  • What are the XFA properties for a drop-down list?

    I am having trouble distinguishing between the "Text" and "Value" for a drop down list.
    I have a data drop-down list that is being populated by a database at runtime. I am using the "addItem" event while looping though the recordset. The "addItem" event takes 2 parameters:
    param1: A valid string representing the value to display in the field.
    param2: (Optional) A valid string representing the new items bound value. If empty, the default value is an empty string.
    What is the corresponding XFA properties for param1 and param2?
    If I want to reference "param2" somewhere else in the form, is it dropDownList.rawValue? is it dropDownList.value?

    reviewed the sample.zip form and xml file. The XML format is different from my file. Your file has one field named "item" with 3 records. <br /><data> <br />- <field> <br />  <item>1</item> <br />  <item>2</item> <br />  <item>3</item> <br />  </field> <br />  </data> <br /><br />My XML file has multiple fields and records. I need to populate the dropdown list with 1 field from XML file/DataConnection and bind the remainder of the DataConnection fields to the form fields. How can I achieve above with the sample example? <br />This is a portion of my xml file. <br /><?xml version = '1.0'?> <br /><ROWSET> <br />   <ROW num="1"> <br />      <ORG_OPER_NAME> U. S. OIL AND GAS, INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6285</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>P. O. BOX 9158</ADDRESS1> <br />      <CITY>HOUMA</CITY> <br />      <STATE>LA</STATE> <br />      <ZIP>703610000</ZIP> <br />      <CONTACT_NAME>ANTHONY P. AUTHEMENT</CONTACT_NAME> <br />      <PHONE_NUM>9858764651</PHONE_NUM> <br />   </ROW> <br />   <ROW num="2"> <br />      <ORG_OPER_NAME>103 TRUCK STOP, INC. </ORG_OPER_NAME> <br />      <ORGANIZATION_ID>101152</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>13</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>4007 WHITE'S FERRY RD. </ADDRESS1> <br />      <CITY>WEST MONROE</CITY> <br />      <STATE>LA</STATE> <br />      <ZIP>712910000</ZIP> <br />      <CONTACT_NAME>103 TRUCK STOP, INC. </CONTACT_NAME> <br />      <PHONE_NUM>3183966200</PHONE_NUM> <br />   </ROW> <br />   <ROW num="3"> <br />      <ORG_OPER_NAME>3 S COMPANY</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>5699</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>RR #2, BOX 99</ADDRESS1> <br />      <CITY>EUREKA SPRINGS</CITY> <br />      <STATE>AR</STATE> <br />      <ZIP>726320000</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br />   <ROW num="4"> <br />      <ORG_OPER_NAME>3-T EXPLORATION, INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6847</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>BANKONE TOWER</ADDRESS1> <br />      <CITY>WICHITA FALLS</CITY> <br />      <STATE>TX</STATE> <br />      <ZIP>763082825</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br />   <ROW num="5"> <br />      <ORG_OPER_NAME>3-T OIL CO. INC.</ORG_OPER_NAME> <br />      <ORGANIZATION_ID>6395</ORGANIZATION_ID> <br />      <OPERATION_TYPE_CODE>01</OPERATION_TYPE_CODE> <br />      <ORGOP_LINE_ID>1</ORGOP_LINE_ID> <br />      <ADDRESS1>RT. 1, BOX 81</ADDRESS1> <br />      <CITY>WEIRGATE</CITY> <br />      <STATE>TX</STATE> <br />      <ZIP>759770000</ZIP> <br />      <CONTACT_NAME>NO CONTACT GIVEN</CONTACT_NAME> <br />   </ROW> <br /></ROWSET>

Maybe you are looking for