How to populate a textfield based on a dropdown list and a checkbox

Hi Guys,
I need help.
first step: I have a dropdown list if i click in dropdownlist "a" and put in numeric field a number bigger than 99 the, checkbox should be marked and  second step: a textfield1 should be visible.
the first step works perfectly but the second doesnt work.
this is my coding for the second step in event : change java script
if ((DropDownList1.rawValue == "a") && (this.rawValue == 1))
TextField1.presence = "visible";
else
TextField1.presence = "hidden";
does anybody have any idea why?
thanks!!
Diana

Hi,
I would put the following in the exit of the dropdown and the checkbox:
if 
(DropDownList1.rawValue == "a" && CheckBox1.rawValue == 1){
TextField1.presence
= "visible";}
else
TextField1.presence
= "hidden";}
(the script is all over the shop, but should be OK in the form).
Then in the exit event of the numeric field (after the changing of the checkbox value) you could call the checkbox exit event.
Good luck,
Niall

Similar Messages

  • 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.

  • How to I remove the 'panel' underneath the Header list, and above the mail Preview pane. Contains 'from' 'subject' 'reply' buttons to name a few. Takes up too much space.

    How do I remove the 'panel' underneath the Header list, and above the email Preview Pane. Contains 'from', 'subject', 'to', 'reply', 'forward' buttons to name a few. Takes up space.
    == This happened ==
    Every time Firefox opened

    setSize (600, 200);orpack ();Kind regards,
      Levi
    PS:
        int i;
    parses to
    int i;
    , but
    [code]    int i;[code[i]]
    parses to
        int i;

  • How to Populate a listbox based on another listbox selection. Please help!

    Hi Experts,
         I have a requirement where I have two listboxs(dropdown list) in a selection screen. I have to populate the second listbox based on the selected item from the first listbox. How to do this?
    I have created a listbox in a selection screen using
    Parameters: p_soldto as listbox visible length 30 user-command chg,
                p_shipto as listbox visible length 30.
    Then I have tried to look at the value of item selected  from first listbox in AT SELECTION-SCREEN OUTPUT, But I am not getting any value of p_soldto.
    I think I am doing something wrong. I think I have to use some event handling like on selection of an item from listbox. But I don't see any such event handing in ABAP.
    Please give me some code example.
    Please help!
    Thanks
    Gopal

    HI,
    Check this program, it is using a list box and filling values into it at initilization event.
    <b>REPORT ztest2.
    TYPE-POOLS : vrm.
    tables: bkpf.
    DATA : values TYPE vrm_values.
    DATA : wa LIKE LINE OF values.
    PARAMETERS : list_box(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    PARAMETERS: dd type bkpf-BSTAT user-command abc.
    select-options: a for bkpf-bukrs MODIF ID buk.
    select-options: b for bkpf-belnr MODIF ID SEL.
    at selection-screen output.
      If list_box = 2.
        loop at screen.
          if screen-group1 = 'SEL'.
            screen-input = 0.
            modify screen.
          endif.
        endloop.
      endif.
    INITIALIZATION.
      wa-key = '1'.
      wa-text = 'Orange'.
      APPEND wa TO values.
      wa-key = '2'.
      wa-text = 'Red'.
      APPEND wa TO values.
      wa-key = '3'.
      wa-text = 'Blue'.
      APPEND wa TO values.
      wa-key = '4'.
      wa-text = 'Gray'.
      APPEND wa TO values.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'LIST_BOX'
                values          = values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.</b>
    Regards,

  • How to populate a form based on values in a database with JSTL?

    I know how to write Java code to connect to a database, but where exactly (and how) in my JSP page , using JSTL tags will I actually call the function that connects to the database?
    Should the code to connect and populate the Java Bean fields go into the JavaBean constructor or anther method ( but from what I understand I can't really call the Java Bean's methods through JSTL - unless I did it througha scriplet)

    I know how to write Java code to connect to a
    database, but where exactly (and how) in my JSP page
    , using JSTL tags will I actually call the function
    that connects to the database?You won't. The point of writing JSPs with JSTL is to realize that the purpose of JSP is to produce HTML, and not to do extraneous things like accessing databases. You would write a servlet that connects to the database, extracts the data, and puts it somewhere the JSTL can find it. (Most likely in a List object in request scope.)
    Then the servlet forwards to a JSP, where you use JSTL simply to scan through that List and convert the objects in it into HTML.

  • How to auto populate a field based on drop down list unless specific item is selected

    Hi all,
    Apologies if I have posted this in the wrong area but I am new to Adobe LiveCycle, JavaScript and these forums.
    I am trying to build an Acrobat form using LiveCycle but am having trouble with the drop down lists.
    Inititaly I simply wanted to populate fields in one table based on the selection of a corresponding drop down list in another table.
    I used the following code and it worked fine:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The problem is that now I want the above code to work UNLESS one of the items in the dropdown list is specifically selected in which case I want the text box in the other table to display a message such as "Enter details in the field below".
    I have tried to create an If Else statement using the following code:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1"); 
    for (var i=0; i <= fFrom.length-1; i++) {
         if (fFrom.item(i).rawvalue = "Option 3"){
         fTo.item(i).rawValue = "Enter details in the field below";
         else {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The code now populates the field with "Enter the details in the field below" no matter what item I select from the dropdown list.
    Your help is greatly appreciated.
    Cheers,
    ozzy_q

    Follow Up:
    Ok so ive changed things up a bit and have had some more success.
    I have used a Switch statement in my For loop to perform different actions based on the item selected.
    The code looks like this:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*] .Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[* ].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         switch (fFrom.item(i).rawValue)
         case "Option 3":
         fTo.item(i).rawValue = "Enter the details in the field below";
         break;
         default:
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
         break;
    This code solves my problem but has thrown up a new issue:
    When i select Option 1 or 2 from the dropdown list  the change in the text field is instantaneous, however if I select Option 3 it wont appear in the text field until I either select Option 3 a second time or select another item. Its as if the text field is a selction behind what I have enterd in the dropdown list.
    Any thoughts?

  • How to populate the GR based Invoice Flag in PO.

    Hi,
      How to check the GR based Invoice flag for a purchase order.One solution we think of is flagging the G.R IV flag at vendor master level in xk03 (Purchasing data view ).Are there any SPRO level configurations to attain the same.
    Thanks.
    Rakesh.

    Hi,
    Look into
    SPRO->MM->Inventory Mgmt->Good receipt->For GR-Based IV
    Refer:
    Re: CAN GR/GI  BE REVERSED EVEN THOUGH DEBIT NOTE IS RAISED

  • How to read the selected value of a dropdown list box

    Hello,
    I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
    I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
    I dont know how to trap the selection made on dropdown list.
    PLease guide me on how to trap the dropdown list field selection value.
    Thanks in advance.
    Thirumala.

    Hello,
    Check what is done in standard for the fielf REGION which is inked to the country.
    Otherwise, you can do the following :
    - in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
    - Put the new value in a global variable (GV).
    - in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
    Hope this will help you,
    Regards,
    Frederic

  • Populating several textgroups based on two dropdown lists troubles

    Hi All,
    I have a dropdown list (case1) which contents "engine1", "engine2" and "engine3" and a second dropdown list (Component).
    If i select in "case1" = "engine1" then in "component" should be displayed "Motor" and "burner".
    it works this way...that's everything fine.
    ----- form1.#subform[0].#subform[1].Case1::enter: - (JavaScript, client) -----------------------
    var 
    arrayItems = eval(Case_1.value);
    for 
    (var i=0; i < arrayItems.length; i++) {this.addItem(arrayItems[i]);
    ----- form1.#subform[0].#subform[1].Case1::change: - (JavaScript, client) --------------------------
    if 
    (xfa.event.newText=="Engine1" || "Engine2" || "Engine3" );
    var 
    arrayItems = eval(Comp_0.value);
    for 
    (var i=0; i<arrayItems.length; i++) {Component.addItem(arrayItems[i]);
    ----- form1.#subform[0].#subform[1].Component::enter: - (JavaScript, client) -----------------------if  (xfa.resolveNode("form1.#subform.Case1").rawValue == "Engine1"){
    xfa.resolveNode("form1.#subform.Component").clearItems();
    var arrayItems = eval(Comp_0.value); 
    for (var i=0; i < arrayItems.length; i++){
    this.addItem(arrayItems[i]);
    if  (xfa.resolveNode("form1.#subform.Case1").rawValue == "Engine2"){
    xfa.resolveNode("form1.#subform.Component").clearItems();
    var arrayItems = eval(Comp_0.value); 
    for (var i=0; i < arrayItems.length; i++){
    this.addItem(arrayItems[i]);
    if  (xfa.resolveNode("form1.#subform.Case1").rawValue == "Engine3"){
    xfa.resolveNode("form1.#subform.Component").clearItems();
    var arrayItems = eval(Comp_0.value); 
    for (var i=0; i < arrayItems.length; i++){
    this.addItem(arrayItems[i]);
    then if i select "motor" then should be visible a group "engine1Motor", "engine2Motor", "engine3motor".
    if i decide to select "burner" after "motor" the group which belongs to Motor should stay visible and a new group should which belongs to burner "engine1burner1", "engine1burner2", "engine1burner3" should be visible.
    and if case2 is filled then a new goup "1.ifcase2", "2.ifcase2", "3.ifcase2" should be visible.
    I tried it this way but it doesnt work :-(
    ----- form1.#subform[0].#subform[1].Component::change: - (JavaScript, client) ----------------------
    if  (xfa.resolveNode("form1.#subform[0].Case1.rawValue") == "Engine1"){
    xfa.resolveNode("form1.#subform.Component.rawValue")
    == "engine1Motor"; 
    Motor.presence
    = "visible";}
    else{
    Motor.presence= "hidden"}
    who can help me to solve this problem??
    Thank u!!
    D.

    Hi,
    The script in itself looks okay, but there are a few things to check:
    That the language is JavaScript.
    That the values your are testing against EITHER match the Item values (in the Object > Field palette) OR the bound values (if specified in the Object > Binding palette).
    I am presuming that this script is in the calculate event of the dropdown.
    The relative references between the objects is not full enough. See: http://assure.ly/kUP02y.
    I think that you could achieve this in an easier way!!!
    Select each of the dropdowns. In the Object > Field palette you will have the items listed. Okay, nothing to do here.
    Now go to the Object > Binding palette and tick specify values. Then for Category 1 specify PN1, Category 2 specify PN2, etc. Similarly for the product dropdowns: Product A specify A, Product B specify B, etc.
    Then in the caculate event of the textfield you would use FormCalc to concat the dropdowns:
    $ = Concat(Dropdown1, Dropdown2)
    I appreciate that the product dropdown is populated based on the users selection in the Category, but you can script the bound value.
    See examples here: http://assure.ly/fYCuQ2, and especially this one: http://assure.ly/jcTahK.
    Also if you want searchable dropdowns: http://assure.ly/mP5Lud.
    Good luck,
    Niall

  • How to make a original frame same with Comment List and Attachment?

    How can I make original frame looking like Comment List?
    I'm using Windows XP and Adobe Acrobat 9 Pro and Acrobat 9 SDK.
    I want to make a new plug-in that use a new frame.
    The new frame is looking like Comment List and Attachment.
    I want to show my original list and input form to the frame.
    It is close to Comment List frame, but I want to show original list.
    Additionally, I want to add new button upper of Comments Button on Navigation Button Panel.
    Can I have any help?

    There is no support in the SDK for adding your own panels.
    There is no support for modifying the existing panels.

  • Personas 2.0: How to catch the selection event of a dropdown list?

    Hi Personas 2.0 experts,
    The use case:
    I want to use a text field to show the "key" of an item that can be selected in a dropdown list.
    The issue:
    After clicking the list and selecting an item, the text field is not automatically updated with the newly selected item content.
    Anyone has an idea to how make such an auto update (pls note I don't want to use an extra button to do the update, just by clicking the list only)?
    Thx.
    Dong

    To display the key (the actual value) that's selected in a dropdown, there is a property called ShowKeys which you could set.
    However if you'd want to show the selected value in another field upon picking an option, this would require an event associated in Personas 2.0 with the selection of a dropdown value. This is currently not available so I'm afraid what you are looking for is not possible.
    Edit: It turns out I was wrong... there is an option (at least it's there in SP3) which allows linking a script button to the dropdown property OnValueChanged, so you can use this to do any script action you need when the user selects a value.
    (thanks, Sushant )
    Message was edited by: Tamas Hoznek

  • Generate Comp based on dropdown list and checkbox selection?

    I currently have a dropdown list with three sizing options in it. Then I have two check mark boxes, one if checked ideally would create the template at its normal composition size and if the other checkbox is checked it would inverse the widthxheight of the composition size. Then below that I have a "generate" button that I want to be able to click and depending on my selections it creates the comp.
    It sounds like I need some sort of if then statement but I'm having a hard time putting the two together. See below what I have so far.
    There may be parts missing but I have it all working in a decibel pallate currently. I just don't have the functionality tied to a button yet.
    Any help would be much appreciated!!!
    (also I don't know how to format the extend script on here so apologies for that)
    // palette controls
    templateGen.VerticalCheckbox     = new Object();
    templateGen.HorizontalCheckbox    = new Object();
    // define values for the controls
    templateGen.comLookup            = new Object();
    templateGen.compLookup          = 'Template1';
    templateGen.compLookup          = 'Template2';
    templateGen.compLookup          = 'Template3';
    function templateGen_getHashValues(hash)
      var ary = new Array();
      for (k in hash) {
      ary.push(hash[k]);
      return ary;
    // "composition" menu
       var panelGrp1 = templateGen.palette.add('Panel', undefined, 'Comp Templates');
      compGrp1 = panelGrp1.add('group', undefined, 'Templates List');
      compGrp2 = panelGrp1.add('group', undefined, 'Orientation');
      compGrp3 = panelGrp1.add('group', undefined, 'Generate');
      templateGen.compList                                             = compGrp1.add('dropdownlist', LIST_DIMENSIONS, templateGen_getHashValues(bapple.compLookup));
      templateGen.compList.helpTip                                = "Choose the type device template you want here. All comps are 60fps.";
      templateGen.compList.selection                             = 'Template1';
      templateGen.compList.graphics.foregroundColor  = darkColorBrush;
      templateGen.VerticalCheckbox                           = compGrp2.add('checkbox', undefined, 'Vertical');
    templateGen.VerticalCheckbox .value = true;
      templateGen.HorizontalCheckbox                          = compGrp2.add('checkbox', undefined, 'Horizontal');
      templateGen.HorizontalCheckbox .value = false;
    templateGen.generateBtn1      = compGrp3.add('button', undefined, 'Generate');
      //applyBtn.onClick =????;

    When I work with dropdowns I always like to attach the data they represent (like width and height of the comp in this case) directly to the items.
    I didn't execute the code to really check it, but it should work like this:
    // add templates to your dropdown and store the items in an array
    var templates = [];
    templates[0] = templateGen.compList.add('item','template1');
    templates[1] = templateGen.compList.add('item','template2');
    templates[2] = templateGen.compList.add('item','template3');
    // attach a width and height to each item
    templates[0].width= 1280;
    templates[0].height= 720;
    templates[1].width= 1024;
    templates[1].height= 768;
    templates[2].width= 1920;
    templates[2].height= 1080;
    // choose the item that should be selected by default
    templates[0].selected = true;
    applyBtn.onClick = function(){
            // read the width and height from the selected item
            var width = templateGen.compList.selection.width;
            var height =templateGen.compList.selection.height;
            if(templateGen.VerticalCheckbox.value){
                  // swap width and height
                  var temp = width;
                  width = height;
                  height = temp;
            // now create your comp here with the given width and height

  • 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

  • How to populate a textarea based on a LOV

    Hi,
    I have a form based on procedure. The form has many fields, among them there are a LOV field and a text field. I want to populate the text field whenever lov will be changed. Can anybody help me?
    Thanks
    Sumita

    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.

  • Auto populate a textfield based on users input

    Hi All,
    Working with Designer ES ver. 8.2, and I am looking to see if it is possible to auto fill another field based on an end users input.
    Example: End-user enters a 6 digit departmentCode for a program; in turn the field opposite to the departmentCode auto fills with a corresponding programCode; if they do not input the correct 6 digit departmentCode the field will return a null value.
    I am trying to move away from my current auto fill drop-down option, so end-user is less likely to select incorrect departmentCode from drop-down
    Best Regards
    Jeff

    radzmar,
    Thank you for your response, I assumed there was a simple script to accomplish my task. I had assumed that the .rawValue property would have come into play and was unaware of the  xfa.event.fullText property.
    Thanks Again

Maybe you are looking for

  • Getting black screen after trying installing windows 7 using bootcamp

    I downloaded ISO for windows 7 ultimate 64 bit and after using boot camp and partitioning my hardware the computer re stared as expected but then i get the black screen saying "Press any key" and i think its becuase windows 7 can not boot up what can

  • PNG file is not opening in CS3 Illustrator

    I painted my drawing and am saving it as a PNG went to >Export and changed transparency and made sure it was 300dpi and go to open the file and it doesnt open. No window or warning that as to why its not working. I bought some PNG clipart online that

  • C# Application using Oracle database

    Hello! I need to create a C# app using oracle database. I don't know how to create a database files (i found that oracle use more than one file for database). I need to create new database, than tables and then connect it in C# application. I don't k

  • Consignment invoice should be posted to PI in MRKO

    Hi The consignment invoice when posted through MRKO transaction, the document was posted to the vendor VN but not the PI - invoicing party. How to configure the system for consignment invoices , so that the posting happens to the invoicing party(PI)

  • Support for ABNT2 keyboard layout

    Is there any plan for supporting ABNT2 keyboard layout (Brazilian layout)? It is a great leap introducing international keyboard, but customizing keyboard layouts or including additional layouts would be a nice feature. Some languages require the use