Dynamically add data to a table field in a drop-down list?

Hello

I tried to create a drop down menu to dynamically fill a table based on what menu option drop down is selected. I can run to add a line to the times, which is good, but I want to add the text for the option chosen to a field in the newly created line. I can get this to work using Row1.Field.rawValue = "blah blah blah" but when I want to get dynamic and call the line created by using something like resolveNode I can't get anything to be entered in the field. Is this possible at all?

Here is my script:

==================

topmostSubform.Page1.tabletest.DropDownList2::exit - (JavaScript, client)

If (this.rawValue == 1) {}

Table4._Row1.addInstance)

Page1.tabletest.Table4.Row1.identity.RawValue = 'Servitude for Transmission line.

};

If (this.rawValue == 2) {}

Table4._Row1.addInstance)

Page1.tabletest.Table4.resolveNode(row1[Table4.row1.instanceManager.Count-1]). Identity.RA wValue = ' Servitude for electricity and other purposes.

xfa.host.messageBox ("Ausgrid");

};

===================

The first part, for this.rawValue is 1 good works for a single instance of the addition. The second part, where I tried to do a resolveNode, adds a line, but does not enter any text.

Thanks in advance for your assistance with and review of this problem.

See you soon,.

Greig

poulate_table_dynamically_from_drop_down.jpg

Hello

the resolveNode method must somExpressions wrapped in quotes.

In front of FormCalc JavaScript does not support numeric values in the [] accessors to solve a case.

Modify your script

Page1.tabletest.Table4.resolveNode("Row1[" + Table4.Row1.instanceManager.count-1 + "]").Identity.rawValue = ...

Tags: Adobe LiveCycle

Similar Questions

  • Hi, PDF form of the guru. How to make a text box become a required field IF a drop-down list is selected as the "Yes"?

    Hi, PDF form of the guru.

    How to make a text box becomes a "required field", IF a drop-down list is selected as the "Yes"?

    and 'not required' if the drop down menu selected as 'No' or left blank.

    Any help would be greatly appreciated

    see you soon

    Use this code in the custom drop-down list field validation script:

    this.getField("Text1").required = (event.value == "Yes");

    (Change "Text1" to the actual name of your text field, of course)

  • Hide text in the field when the drop-down list is selected

    Hello, I am looking for a way to hide text in a text field when a number is from a drop-down list. For example, I have a table with text field that have a line pre-populated text in them. I would like the text to be deleted if 'Yes' is selected in a data entry drop-down list in the text box empty now.   Here's what I have so far:

    If (this.rawValue == 'Yes') {SubStandard_A.StandardPkgTbl.Row1.TextField2.rawValue == ' ' ;}}

    I tried .rawValue == "", .rawValue == null, .clearItems

    Any help is greatly appreciated!

    Hello

    Just spotted your original script had a double == when assigning the value to the rawValue. You must use the double == equality test.

    Here is a sample.

    We hope that make you it work.

    Niall

  • If/Then to control the behavior and the importance of the 3 fields according to drop-down list

    My form has 3 fields that I need to control their values and/or the behavior based on the value of the drop-down list.   If the value is 'original', I need the field value may not be mandatory, and 2 fields melts just return null.  If it is selected to 'change', I need the current value to be mandatory, and calculations made on background 2 fields.    Here is what I have in the event exit (JavaScript) from the drop-down list, which is called OrderType, but nothing happens.  What escapes me, or do I need this on the incorrect event or should I use FormCalc?

    Appreciate any help, thanks!

    2-5-2013 10-26-13 AM.png

     form1.#subform[0].OrderType::exit - (JavaScript, client)
    
    if (this.rawValue == "Original")
    {
        xfa.resolveNode("form1.#subform.value_curr").rawValue = "";
        xfa.resolveNode("form1.#subform.value_curr").mandatory = "disabled";
        xfa.resolveNode("form1.#subform.value_change").rawValue = "";
        xfa.resolveNode("form1.#subform.value_total").rawValue = "";    
    }
    else if (this.rawValue == "change")
    {
        xfa.resolveNode("form1.#subform.value_curr").rawValue = "";
        xfa.resolveNode("form1.#subform.value_curr").mandatory = "error";
        xfa.resolveNode("form1.#subform.value_change").rawValue = xfa.resolveNode("form1.#subform[5].tblBOM.FooterRow.GrandTotal");
        xfa.resolveNode("form1.#subform.value_total").rawValue = value_curr + value_change;
    }
    

    I've sent the updated document to your email ID. Please chk.

    Thank you

    Sofiane

  • How to disable the field in the drop-down list to enter a value

    I got a box dropdownlist field and previously a few numerical values on her list:

    say a list of page numbers,

    11

    22

    33

    41

    42

    43

    52

    ..

    I put codes on the change event so that once the user clicks on an element, it is directed to the specific page immediately.

    But the case is that some users would like to enter the field and type a number rather than clicking.

    If he tries to type 42, change event will get him on page 41 instead (as the 1 '4' tank is put in correspondence),

    and then accidentally edit a field then put the tank rest '2' on it.

    so, how can I disable tapping on a drop down field?

    Rgds.

    Hello

    If you select the drop-down list and go to object > field palette. Here you can uncheck "allow customized entry. This will prevent the user to type in the drop-down list.

    With the drop-down menus, I prefer script to the exit event.

    Good luck

    Niall

    Ensure the dynamics

  • If I have several fields and if I select a field in a drop-down list it will fill the other fields

    If I have several fields and if I select a field in a drop box is it possible to auto poplulate the other fields.

    Thank you

    Brain

    Please post your question on InfoPath 2010 at the following link

    http://social.technet.Microsoft.com/forums/en-us/sharepoint2010customization/thread/e70c23a9-1b68-4EF9-9FB4-923997043e56/

  • How to make the fields from the drop-down list required to make a selection before you save a PDF file

    I have a PDF form where I entered a JAVA script in some areas by using the option ON BLUR under 'Actions' and it works very well to prevent users to go to another site if they leave the field with the empty JAVA Script in place.

    My question is that I have other form fields that have a drop down menu where they can choose several options. I would also like to make these fields to where they can't move forward on the form unless they choose an option in the list. However, because with the option in the list "choose a ' is a default option entered into the field (field is not empty), script JAVA of BLUR ON option I used in my empty fields does not work to block the user to move beyond the matter without selecting an option. They are able to save the form with all the drop down menus staying to 'pick '.

    I made the field "Required fields" then they are highlighted with the red area around, but is there another tool to force them to choose an option for each in the drop down menus before you save the form, instead of being able to save with leaving the 'choose One' in the field by default?

    The best way to do this without knowing the default value of the field is to compare the value of the field to the default value of the field... You must make sure that your default value is not part of the possible acceptable answer. It works with most of the field types that a user can fill.

    If (event.value! = event.defaultValue) {}

    do something;

    App.Alert ("required field not completed. \nField name: "+ event.target.name, 1, 0);

    }

  • Add/Remove the same exact point from a drop down list

    Hello!

    I need power remove/hide and/add/view THE SAME POINT, or that it doesn't look like the same question, please see the example of what I m doing:

    When you open the document:

    01.png

    If you click 'Yes' to the first radio 4 value is added

    02.png

    If you click 'Yes' in the second radio, value 5 is added

    03.png

    If you click 'no' on the first radio, you remove the value 4 BECAUSE you remove the element #3

    04.png

    If you click on 'no' on the second radio, you delete nothing 4 BECAUSE you try to delete the point #4


    05.png

    And then you get this weird combination

    06.png

    This is the code on the first Radio

     form1.#subform[0].value_4::click - (JavaScript, client)

    if (this.rawValue == "1") {
         DropDownList1.addItem("value 4");
    }else {
        DropDownList1.deleteItem(3);
    }

    This is the code on the second radio

     form1.#subform[0].value_5::click - (JavaScript, client)

    if
    (this.rawValue == "1") {
           DropDownList1.addItem("value 5");
    }else {
           DropDownList1.deleteItem(4);
    }

    Anyone know how to remove a specific item of a dropdrown? or may not remove, hide only if this is possible... I tried to change specific values for Add/Remove always from the same point, but it did not work.

    Thank you!

    Ago, I find it odd that there is no native method xfa for the index of an item in the menu drop-down. Not documented at least (as I know).

    What you can do however, is create your own method!

    Here, in the initialize event of your highest subform you create a method that exends class object (which includes all XFA objects too), like native JavaScript:

    //@para String value of the item in the drop down
    //@return Boolean - true if item was deleted, false if not and null object if not found in the list
    
     Object.prototype.deleteItemValue=function(sVal){
     for (var a=0;a
    

    You can remove any item from your drop by modying your code:

    if (this.rawValue == "1") {
     DropDownList1.addItem("value 4");
    }
      else {
     DropDownList1.deleteItemValue("value 4");
    }
    

    Kyle

  • How can I add a search engine "You Tube" to the drop-down list to the right of the address bar?

    It is no longer available and I can't find it on You Tube site, as suggested in one of the help pages. I lost looking through them.

    https://support.Mozilla.org/en-us/KB/search-bar-easily-choose-your-search-engine?ESAB=a & As = AAQ

    I use Firefox 22 with the Windows 7 operating system.

    Please let know us if there is a solution, I have to do.

    I was rather surprised not to see one myself. Perhaps because it is now considered that Google a using the video option is that the same one you tube search.

    You can order lists in

  • Data from the field drop-down list does not clear when the reset button is activated

    Acrobat Pro XI

    All field boxes are checked in the tab properties of the button actions... but when I click on the reset button of the form I created only the data in clear text fields, not any of the data that has been selected in a drop-down list.  What I am doing wrong?

    The 'rest shape' command returns the fields to their default values. If this

    value is not empty, that's what he'll be back.

  • Create a dynamic drop-down list field in Adobe Acrobat Pro XI

    Hi all. I am creating a field in one of my forms using Adobe Acrobat Pro XI. I have a drop down list of 'core' items, and according to what is selected in the list, I want a second drop-down list to give different choices. I've searched and searched and have javascript that I thought might work, but maybe I'm have a mistake or I'm place javascript code in the wrong place, because it does not work. I know very, very little about javascript, any help would be so appreciated.

    I use Adobe Acrobat Pro XI. I added a "new field" and selected "drop-down list. The domain name is ProvType. The options of the menu drop-down are:

    Hospitalized patients

    External consultations

    Doctor

    I have "Commit selected value immediately" selected. The field is not validated. The format is 'none '. There is no measures or calculations associated with it.

    I then created another dropbox and named SubProvType. Under Actions, I selected the trigger as the mouse upwards and then selected the Action "executes a JavaScript script. I selected the Add button and he hit in the JavaScript editor:

    Switch (ProvType.rawValue)

    {

    case "Hospitalisation":

    this.setItems ("Hospice, hospital, Nursing Facility");

    break;

    "outpatient": case

    this.setItems ("adult day Center, Home, others");

    break;

    case 'doctor ':

    this.setItems ("surgeon, general practitioner, neurologist");

    break;

    }

    What I want to do is:

    If "Hospitalization" is selected, I want only the following options to be available in the second drop-down list box "SubProvType":

    Palliative care

    Hospital

    Nursing facility

    If "outpatient" is selected, I want only the following options to be available in the second drop-down list box "SubProvType":

    Adult day Center

    Home

    Other

    If the 'doctor' is selected, I want these options to be available in the second drop-down list box "SubProvType":

    Surgeon

    Family practice

    Neurologist

    However... when I close form editing and try to select a different option in the ProvType field, SubProvType field is left blank and there is no options available. Also, there are no errors.

    I must be missing something, but I have no idea where to start. Thank you in advance for any help anyone can provide.

    Use this code as the ProvType custom validation script (and remove any code that you have associated with SubProvType):

    switch (event.value) {
        case "Inpatient":
            this.getField("SubProvType").setItems(["Hospice,Hospital,Nursing Facility"]);
            break;
        case "Outpatient":
            this.getField("SubProvType").setItems(["Adult Day Center,Home,Other"]);
            break;
        case "Physician":
            this.getField("SubProvType").setItems(["Surgeon,Family Practice,Neurologist"]);
            break;
    }
    
  • How to change values from drop-down list in several fields simultaneously

    I have a 50-page form that contains a multitude of areas.  One of the fields from drop-down list is repeated throughout the form.  The values in the drop-down list options must be the same for all fields of form drop-down list.  These fields are not copies.  I need to make them individually selectable with touching other areas.

    The problem is, I often have to update the values in these fields... and there are dozens of them.

    Is there a way to store the list in the document and have all dropdowns access from this central location?

    You can do quite easily with a script. For example:

    var aList is ['Alaska', 'Washington', "Oregon", "Idaho", "Montana"];.

    getField("dropdown1").setItems (aList);

    getField("dropdown2").setItems (aList);

    Add any other dropdowns here

    You can store this code in a JavaScript function at the level of the document and update it and then call it whenever you need to update the drop-down lists. If you need to include the value of exports for the elements, you need to change the table suruneliste to an array of arrays, something like:

    aList var = [['Alaska', 'AK'] ['Washington', 'WA'], ['Oregon', 'GOLD'], ['Idaho', 'ID'], ['Montana', 'MT']];

  • Try to fill a text field of a zone drop-down list by using an 'if' statement

    I am filling a text field (modelT) with the text corisponding in the 'data' part of the selectedItem in the drop-down list box. The 'data' appears correctly when I use:

    modelT.text = event.target.selectedItem.data;

    But I'm calling it with an "if" (in red) and subsequently, I can dynamically fill the text field of the multiple drop-down list box. am I missing something simple, here is my code:

    Import fl.controls.ComboBox;
    Import fl.data.DataProvider;
    Import fl.managers.StyleManager;

    var cPurpose:Array = new Array)
    {label: "Execute task", data: "1"},
    {label: "Transportation equipment", data: "2"}
    );
    var purCb:ComboBox = new more;
    purCb.dropdownWidth = 260;
    purCb.width = 260;
    purCb.move (10, 300);
    purCb.prompt = "object of truck?
    purCb.dataProvider = new DataProvider (cPurpose);
    purCb.sortItemsOn ("label");
    purCb.addEventListener (Event.CHANGE, purchangeHandler);

    addChild (purCb);

    function purchangeHandler(event:Event):void {}
    trace ("Selected" + event.target.selectedItem.data);
    purT.text = event.target.selectedItem.label;
    purCb.selectedIndex = - 1;

    If (event.target.selectedItem.data == 1)
    {
    modelT.text = "T660"
    }
    If (event.target.selectedItem.data == 2)
    {
    modelT.text = "W900;
    }

    Thanks in advance for your help

    You must delete or move the following line so that it is not set to zero for the combobox control before trying to read what is selected:

    purCb.selectedIndex = - 1;

  • Add instance with the values of the previous instance drop-down list

    Hi all!

    Need help with javascript.   I have a form that contains a radio button B when you select it, shows a subform.  Inside the subform is a table that contains a drop-down list.  The drop-down list is populated based on a previous option box A, who has been chosen and is a subset of the possible values.

    The user can click a button to create an additional instance of the subform.  It's the new instance is in the original version of the subform, and the drop-down list is not the subset of values.

    How can I get the drop-down list in the added instance view only the subset dropdown values?

    Let me know if you need more information.

    Thank you!

    Jodi

    You need to access the instance of right holders...

    Because you create new instances, you must access them using the method resolveNode()

    You can access the instance by using the 0-based index, if you are in the event to initialize the combo you can simply use 'this' instead of 'Main.PreApproved.Awardees.Table1.Row1.AwardType '.

    When you add an instance to the click event of button:

    var newAwardees = Awardees.instanceManager.addInstance (1);

    newAwardees.presence = "visible";

    newAwardees.Table1.Row1.AwardType.clearItems ();

    newAwardees.Table1.Row1.AwardType.addItem ("prize for Excellence in mentoring Faculty");

    //[...]

    DropDownList initialize event:

    If (this.length == 0) {}

    this.clearItems ();

    this.addItem ("prize for Excellence in mentoring Faculty");

    //[...]

    }

    If you change the value in the option button (which modifies the subset values):

    for (var i = 0, oLen is Main.PreApproved.Awardees.instanceManager.count; I< olen;="">

    var oneAwardees = Main.PreApproved.resolveNode ("Fellows [" + I.ToString + "]");

    oneAwardees.Table1.Row1.AwardType.clearItems ();

    oneAwardees.Table1 "Row1.AwardType.addItem ("prize for Excellence in mentoring Faculty");

    //[...]

    }

    I hope this helps!

  • Add in the drop-down list in a custom schema

    Is it possible to create a field with a drop-down list of items in a custom schema prelude? Or, perhaps, the ability comes in styles: (integer, real, text, Boolean) and I'm simply not selecting or using those properly.

    I noticed that it's done in some provided by Adobe, like the one named meta tags > Script...

    Thank you!

    Bobby

    Screen Shot - showing drop down list.png

    Hi Bobby.

    Unfortunately, it is not currently possible to create a table of items in a field of custom metadata provided. We have some items back to feature in our XMP team watching such things possible in the future.

    Kind regards

    Michael

Maybe you are looking for

  • Apple Watch activity is not in the cloud?

    So, I've been using a Apple Watch for a while and my number one problem is that 'Activity', I put together for the last year is not sync with the iCloud, so when I upgraded my iPhone 6 to iOS10 all my activity watch is gone. I tested this point last

  • Safari 10 stuttering during scrolling

    After updating to Mac OS and safari 10, I noticed that when scrolling the page animation stutters when slowing down. It is not consistent, but it seems quite often. I can't do with extensions, after you disable Adblock (the only extension I was using

  • My phone is repairable?

    Hi, I dropped my phone a month ago and I still didn't we go to repair. My phone screen is broken and the LCD screen is cracked so and it still works, but I can't do anything else that press the button on/standby to check the time. In addition, the sc

  • Open a new file and can't find anywhere?

    Tried to create a new folder called but it does not show anywhereHe tried again, I was told this folder already exists, but where?I tried with a different name and tha gone tooRenamed an existing folder and it disappeared! Help! someone ' one/somethi

  • File format Consortium and 3mf 3MF

    Can anyone give me some information on the consortium 3MF and how to participate.