Total responses of several drop-down lists

Hello:

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

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

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

Thank you!

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

Something like:

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

It is not to see your exact hierarchy.

Kyle

Tags: Adobe LiveCycle

Similar Questions

  • Several drop-down lists with the same content

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

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

    Help much appreciated, thanks: =)

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

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

    var ProductArray = new Array)

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

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

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

    );

    function PopulateProductDropdown (ddlList)

    {

    var numProducts = ProductArray.length;

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

    {

    ddlList.addItem (ProductArray [cnt]);

    }

    }

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

    Form1.variables.scripts.PopulateProductDropdown this);

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

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

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

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

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

    Function in JavaScript to the document level

    function updateDropdown() {}

    Get references to the drop-down menus of entry

    var F1 = getField ("DropdownList1");

    var F2 = getField ("DropdownList2");

    Refer to the output drop-down list

    F3 var = getField ("DropdownList3");

    Get the values of input field, as strings

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

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

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

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

    F3.clearItems ();

    } else {}

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

    }

    }

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

    updateDropdown();

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

  • Several drop-down lists with Switch statement

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

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

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

    part = this.rawValue

    SOnineThreenine.fxnineThreenine (part);

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

  • Several drop-down list selection

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

    Please notify.

    Hey,.

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

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

    Save the prompt.

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

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

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

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

  • Barcode 1 d dynamic of several drop-down lists

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

    Here's what I have so far:

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

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

    What I'm missing here?

    Please check the update below code.

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

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

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

    -Rambeau.

  • Several drop-down lists by email

    I looked on several forums and throughout the internet on how to configure my PDF form to have a selection of one of the examples:

    A: two separate buttons send email (which will go to a different email based on selection)

    or

    B: a dropdown list with the selections of e-mail sending to the name specified after hitting the submit"" button.

    In my opinion, I'm just above this one, but I can't seem to get through. If this has already been covered in the Adobe Forums, can someone direct me to this thread? If this isn't the case, I'll be happy to work one-on-one with someone to review my PDF form.


    Thanks in advance,

    T. Hayden

    Design services, Purdue University

    I posted a sample of what I think you want... Take a look and tell me what you think.

    Paul

  • Hide the drop-down list when you print only when "PLEASE SELECT" is selected (unused field).

    Our form has several drop-down lists that by default the option "Choose", and not all of them are used whenever the form is used.  When we print a copy of each document, we would like the (unused) field "Choose" to disappear when printing - to make a copy of paper filter.  Is there a script for this?  I tried to use only the general framework ' Visible but does not print ", but of course, the field prints any - we need to print only when there was one another option as the default"Select"is selected.  Thanks in advance for your help.

    Coleen

    You can use a custom validation script, something like:

    Event.Target.Display = event.value = "choose"? display.noPrint: display.visible;

    To put this into effect, you will need to make a different choice and place it back to "choose." Another option would be to place as a custom Format script.

  • How to increase the length of a drop down list?

    Hello

    I hope you do well!

    I have a page of the ADF that was created automatically to a human task.

    I have several drop-down lists (SelectOneChoice) in the form, but they are sized according to the data in it.

    It seems weird with different sizes, if I want to make the size of the set of fixed length. How can I do?

    I tried changing the 'size', 'width' options, but nothing works. Even try a few forums. You please help me in this regard.

    Thanks in advance.

    Concerning

    RaviKiran

    Hello

    I have it!

    Width: 175px in ContentStyle the fact. Thank you.

  • fill a list based on a value from the drop-down list box

    Well, I know a way around it but its quite long with what I know. I worked on a better solution for a day now. So maybe (or likely) someone knows better. I'm trying to fill a drop drop down based on a user selection figure in a list of check boxes. I know I could create several drop-down lists and hide away them until the user changes the value of binding. But the dropdowns would consume a lot of space in my form design in liveCycle. So is there another way or I'm stuck he made a long journey. I also need to assign values to these elements, since they change because the values are used as item numbers later that fill a text/number field later in form as a list of materials.

    Tell me if I'm wrong, please (I'm new to all this)

    in the box in the click event

    If (this.) RawValue == 1)

    {

    dropDownList1.addItem ("item # 1", "value1111");

    dropDownList1.addItem ("item # 2", "value2222");

    }

    on the other

    {

    dropDownList1.rawValue = "null";

    }

    I'm sure that null is not good and I don't know that I have to set the drop-down menu to clear items on preOpen. Or maybe not. And there is a way to add items without the addition of a new right of the line? I'm on the right track?

    Hello

    Rather than having the script in each of the boxes, you can have the script in the event preOpen the drop-down list that leans on the boxes.

    I downloaded an example here: https://acrobat.com/#d=VwREjsMgvqXpVqPu54kSNw

    Take a look at the preOpen the dropdown event.

    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems(); 
    
    // repopulate the items based on the checkboxes
    if(fruit.rawValue == 1)
    {
         this.addItem("Apples", "fruit_001");
         this.addItem("Pears", "fruit_002");
         this.addItem("Oranges", "fruit_003");
         this.addItem("Bananas", "fruit_004");
         this.addItem("Grapes", "fruit_005");
    }
    
    if(cars.rawValue == 1)
    {
         this.addItem("Volvo", "car_001");
         this.addItem("Ford", "car_002");
         this.addItem("Opel", "car_003");
         this.addItem("Toyota", "car_004");
         this.addItem("Nissan", "car_005");
    }
    
    if(counties.rawValue == 1)
    {
         this.addItem("Co. Tipperary", "county_001");
         this.addItem("Co. Cork", "county_002");
         this.addItem("Co. Dublin", "county_003");
         this.addItem("Co. Clare", "county_004");
         this.addItem("Co. Kerry", "county_005");
    }
    

    Hope that helps,

    Niall

  • Design of a PDF form to fill-in the drop-down list

    Design of a PDF form - how we copy the content of the 'text' of a drop-down list box to paste into "boxes" of several drop-down lists for the same shape?

    You can't copy and paste the values of the range of object definition, but you can copy and paste the object in its entirety... who would not do the same?

    Paul

  • Automatic module in the drop-down list

    Is is possible to make a drop-down list to add a new element of list, every time someone entered something that is not already in the list?

    Thank you

    Josh

    • The script adds a "custom" name The names following the original crash. Is it possible to have the ability to add an unlimited number of additional items to the drop-down list?

    OK and I think v1.1 solves this problem. Testing, sorry, more tests can prove me wrong. The array must be initialized in the body of a function, otherwise, it gets recreated in each call to the script object. So I created a form (aka the global variable) variable to contain the initial data. With each release, event, I added a call to a function called checkData() that validates the entered value (either selected in the drop-down list or a custom text entry) does not exist.

    I am adding new values to the form variable and recreate the table of the form variable. This works very well for this use case, but I would discourage that adopting a form with several drop-down lists and/or a lot of data related to each dropdpown. You should really use data binding and put the processing on the server.

    Form1.Page1.Subform1.Dropdown1::exit - (JavaScript, client)

    If (! form1.page1.subform1.dropdown1.isNull) {}
    var str = form1.page1.subform1.dropdown1.rawValue;
    If (isNaN (str)) {}
    populateDropDowns.checkData (this);
    Form1.Page1.Subform1.dropdown2.clearItems ();
    Form1.Page1.Subform1.dropdown2.execInitialize ();
    }
    }

    Form1. #variables [0] .populateDropDowns - (JavaScript, client)

    stooge of var = new Array();

    function loadData (dropdownField) {}
    tenure = createArray();
    for (var i = 0; i)< stooge.length;="" i++)="">
    dropdownField.addItem (stooge [i]);
    }
    }

    function checkData (dropdownField) {}
    tenure = createArray();
    Check that the value is not in the table
    If (stooge.lastIndexOf (dropdownField.rawValue) ==-1) {}
    addData (dropdownField);
    }
    }

    function addData (dropdownField) {}
    var stoogeStr_ = stoogeStr.value;
    Check that the value is not in the global variable
    If (stoogeStr_.search(/dropdownField.rawValue/) ==-1) {}
    stoogeStr.value = stoogeStr.value + ', ' + dropdownField.rawValue;
    tenure = createArray();
    stooge.push (dropdownField.RawValue);
    dropdownField.clearItems ();
    loadData (dropdownField);
    }
    }

    function createArray() {}
    var stoogeStr_ = stoogeStr.value;
    tenure = stoogeStr_.split(",");
    return of foil;
    }

    • Because the initialization event again fills the drop-down list with the default Larry, Curly, Moe, the drop-down list loses 'tailor-made' entries on the reopening of the PDF file. Is there a way to save the final drop-down list, so that the options are there when the file is saved, closed and reopened its doors?

    This really requires a server solution or a rights compatible form that allows client-side XML import/export.

    Steve

  • Nested drop-down lists (3) spontaneously corrupt

    I have a project in Robohelp X 5 which worked well. A topic is incredibly dense (very complex procedure) and includes a drop-down text box nested three layers (layer one contains several drop-down lists, and all of them contain some institutions).

    Converted Robohelp 7 project, seemed to convert well. Audited the spelling/grammar on the printed and discovered documentation that this topic has been altered. The first layer contained the * links * layers second, but the * content * second layers had migrated upwards in the first layer.

    I have rebuilt the subject (well, part of it), digging in the third layer. When I saved the topic I stepped back to the main view of the subject (as expected). Opens the drop-down text box to the first layer and... he had more corrupted.

    Someone knows something like that? Any suggestions on what to do? Color me confused now :-(

    Thank you!

    Have figured out exactly what goes wrong, will post in a different heading because it is not, in my view, a conversion problem.

  • Delet several addresses in the drop-down list on the e-mail page

    on the page of the mail, the box where you put the address in I put the first letter of the address and a drop-down list box appears with several address of the person even all but 1 is false. I went to the address book, and there is only one address of this place.
    How can I remove all the wrong address in the drop-down list?
    Thank you
    Herbalifeman

    Look for these wrong email addresses in your address book and remove them.
    Make sure to look in all address books you may have, including the "collected addresses".

  • How to use a function switch box to the reference that is used several times in the previous drop-down list options?

    I use JavaScript coding in LiveCycle and development of dependent drop-down areas, but I find it difficult to write correct code. See the example below. I'm trying to use a multiple box function that refers to an option that is listed several times in the previous pull-down menu. The problem I am running into is that when I refer to any color or Nissan and Chevy, it returns the results of the color in the "Ford" column only. I'll always see color (blue, black, green and purple) options in my second drop-down list and it seems fine, but then the third drop reference only the options and colors 'Ford '. (I don't have the code for the third menu list drop-down).

    I want the client to choose Chevy or Nissan and have her drop downs (based on the color they chose)-dependent, but I can't seem to make this work.

    I hope it is clear enough (probably as mud...). I would appreciate help!

    Form1. #subform [0]. #subform [1]. cboModels::exit - (JavaScript, client)

    cboColor.clearItems ();

    {Switch (this.) RawValue)}

    case "Ford":

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    case 'Chevy ':

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    case "Nissan":

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    }

    Form1. #subform [0]. #subform [1]. cboColor::exit - (JavaScript, client)

    cboPrice.clearItems ();

    {Switch (this.) RawValue)}

    case "Ford":

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    case 'Chevy ':

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    case "Nissan":

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    }

    You can use '\n' for newline in a string, so

    "Option 1, \nOption 2, \nOption 3;

    Put each on its own line.

    Bruce

Maybe you are looking for

  • FlashAir W-03 SD Card

    Just bought this. Link to my laptop but the link for the Windows software on the instruction sheet and on the site of Toshiba UK goes to a page in the Japanese site which will not. Can someone please tell me the link in English?

  • Will be this wall charger FRY my ipod?

    I'm trying to start with apple and their products and I have a question. I ordered an ipod touch 32 GB, but he says that he will not come with a wall charger adapter. I have one, but I want to do that I do not fry the battery the day that I get it. I

  • HM Prm Vista 64-bit; no updates in a month

    I have the same problem, and so far, I've done EVERYTHING on the internet to resolve this issue, register the DLLs needed to download the latest version of the Update Manager (when I ran, he stated that he had suffered an unrecoverable error) and not

  • Awakening of the mode standby

    My computer turns on fashion 'sleep' almost hourly, when not in use. How to make this stop? I can hear it power up frequently during the night. Thank you

  • I received a phone call today (a third) saying that my computer has been hacked and that they need to get into my system for necessary repairs

    * O.T. > phone call I received a phone call today (a third) saying that my computer has been hacked and that they need to get into my system to make the necessary repairs.   They have stated that they are from Microsoft but I didn't honestly believe