Populate cc field based on dropdown list values

I know this question has been posted before, but I'm very new at this, and the answers I've found so far are over my head.
I'm trying to create a submit button that will not only e-mail to a specific address, but also carbon copy someone when their name is selected in a drop-down list on the form.
I don't know much about javascript - and that seems to be the way to get this done - but I don't know the syntax or where to enter the JS to get this functionality. The field I am using is called 'Supervisor1', and I've assigned values (e-mail addresses) to each of the names in the drop-down.
Can someone help me get this done?
Thanks in advance!

Hi,
this scenario is not covered by the macro, but it's not that complicated to handle.
1. Select the button with the script you generated with the macro.
2. Now wrap the mail function into an if-expression.
This sample checks if var0 or var1 is null.
var var0 = xfa.resolveNode("Formular1.#subform.Dropdown1").rawValue;
var var1 = xfa.resolveNode("Formular1.#subform.Textfield1").rawValue;
if (var0 === null || var1 === null) {
          xfa.host.messageBox("Please select an item from the drop down box first!");
} else {
          event.target.mailDoc({
                    bUI: false,
                    cTo: var1,
                    cCc: var0,
                    cBcc: '',
                    cSubject: 'Testmail',
                    cMsg: 'Hello,\n\nhere is the final form data. \n\nKind regards\nMe'

Similar Messages

  • If / then calculation based on dropdown list value in repeating row

    Hello
    I am new to Livecycle. I have created a repeating row in a form. The last field in the repeating row is a numeric field that = the product of two previous fields in the row (NumericField1 *  Numeric Field2). I also have a DropDownList1 near the beginning of the row (third column) that contains variable categories for that calculation row, e.g. Advertising, Office Supplies, Entertainment. I would like to create numeric fields in the form (perhaps in a footer row?) that contain sums of the subtotals of each row, depending on the category selected in DropDownList1. In other words I need to create a subtotal field for all calculations beginning with the category of Advertising, another for Office Supplies, another for Entertainment.
    From what I understand I need to list the variables first, then create an if/then calculation but I am not sure about the steps involved in creating the script.
    df

    NumericField3 is the name of the field containing the product of NumericField1 * NumericField2. I have created a NumericField8 in the form with the following calculation in FormCalc:
    if(Table1.Row.DropDownList1.rawValue == "ADVERTISING") then
    sum(Table1.Row[*].NumericField3)
    end if
    That's not helping. I think I need to designate variables before the if/then script, yes? Would I need to use a resolve command, a getfield command, or . . .? Can anyone help?
    Thanks, in advance,
    df

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • Populate a field based on a drop down or multiple choice

    Would it be possible to add a feature that allows users to populate a field based on the value of another field?
    I'm trying to setup a form where a technician selects their name from a drop down list, and then have the form populate their e-mail address based on their name. I would prefer to avoid forcing them to type in their e-mail address every single time so that they can get a copy of their form responses when they submit a form.
    Thanks!

    Hi,
    Thank you for your feedback. You can vote fo the calculations feature using this form:
    https://adobeformscentral.com/?f=XnF-KJVCovcEVQz9tZHYPQ
    Regards,
    Brian

  • Show or Hide fields based upon a variable value

    Hi,
    I am a rookie in the field of Acrobat. And my only question is :
    How to Circle a Form Field based upon a variable value .
    For example, If x=1, I want to circle Japan and if x=0, I want to leave it without any change.
    Please help me out. Thanks for your time and help.
    Thanks,
    Vijayvijay77.

    Hi George,
    I am pre-populating a Pdf file based upon the data submitted by the user. And I have to circle options selected in the form.
    I am writing coldfusion code to flatten, populate the form into a PDF form. The end result is the PDF generation with all the data in it.
    The data comes from the database, where I set variable values if any is selected or not.
    Thanks for your reply, I really appreciate your help.
    Vijayvijay77.

  • Max length of Dropdown list value

    Hello,
    I wanted to know the maximum length that a dropdown list value can have in an offline Adobe form. Any help would be appreciated.
    Thanks,
    Rohini.

    Hi,
    Its always better to keep the no: of values in the drop down to hundreds.
    If you are running to 1000's, go for some other options like asking the user to enter the value and then do the check for that specific value. Also, usability of the drop down will be worse, if it has more values (just think of you selecting a value from a list of 10000 values - sorted or not).
    It may also result in the scroll bar growing so thin that it disappears, do try it out yourselves by increasing the values to about 130000 [:)].
    Thanks and Best Regards,
    Anto.

  • I am trying to update my billing detail on my IPAD2. However it keep on saying that the country need at least 3 characters long. But the country field is a dropdown list with Malaysia's states all with 2 characters long only! I can't make any purchase now

    I am trying to update my billing detail on my IPAD2. However it keep on saying that the country need at least 3 characters long. But the country field is a dropdown list with Malaysia's states all with 2 characters long only! I can't make any purchase now because I can't verify the billing detail because it just doesn't work! Very frustrating now.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Me21n change line item dropdown list value

    hi experts,
    i have a requirement to automatically remove the aulty po line item when user click on CHECK or SAVE button, i done this by removing the record from ETT[] and POT[] at ENHANCEMENT-POINT mm06ef0p_pruefen_01 SPOTS es_mm06ef0p_pruefen INCLUDE BOUND.
    it is working fine except one scenario which is, if the faulty line item is 00020, and the line item dropdown list is selected line item 20, after i removed the record from POT[], it hits abap runtime error. when i check at debugger, it is caused by system will look for line item 00020 ( follow dropdown list value ) but the record is removed, so come to error... it is working fine if the dropdown list is selected line item 10.
    so i am looking for a way to change the dropdown list value.
    or you all have some other suggestion?
    please help... i need it urgently coz i have been solving the problem for 2 weeks....
    thanks a lot

    Hi,
    generally it's not a good idea to delete item without using standard method. You can see one example why it is usually complicated. Maybe I have a workaround for you. You can try to use BADI ME_PROCESS_PO_CUST. There is a method CHECK where you get reference to PO header. You can easily get references to your items by calling method GET_ITEMS. So you will perform your check for each item and for wrong items you will call method INVALIDATE. This item will be marked as invalid and it will not be posted. Here I do not know how it will be displayed to user. Maybe the user will have to delete this item manually.
    Cheers

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

  • Auto populate fields based on dropdown selection

    New to forms and needing some insight
    Is there a way to auto populate a series of fields based on the selection of a dropdown box
    for instance;
    chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...

    Yes, but not easy and you do not want to have a large number of items.
    Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker

  • Populate text field based on the lov selected value

    Hi,
    based on the value selected in lov, i want to populate another text field. Below is the code I have written
    In PFR:
    if(pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM);
    if ("lovCategory".equals(lovInputSourceId))
    java.util.Hashtable lovResults = pageContext.getLovResultsFromSession(lovInputSourceId);
    if(lovResults!=null)
    String value =(String)lovResults.get("lovCategory");
    amobj.categorycode(value);
    AMImpl code:
    public void categorycode(String code) {
    sundryCodeVOImpl vobj = getsundryCodeVO1();
    vobj.setWhereClause( "lookup_code = "+"'"+code+"'");
    vobj.reset();
    vobj.executeQuery();
    String desc = vobj.first().getAttribute("Description").toString();
    String attr = vobj.first().getAttribute("Attribute1").toString();
    testEOViewImpl vobj1 = gettestEOView1();
    vobj1.getCurrentRow().setAttribute("CodeDescription",desc);
    vobj1.getCurrentRow().setAttribute("PurchasingCategoryCd",attr);
    vobj1.executeQuery();
    With this code, the updated values for the attributes CodeDescription, PurchasingCategoryCd are getting inserted into the database table but they are now showing up in the text fields when a value is selected in lov.
    Please tell me what is the mistake I'm doing.
    Thanks
    Sunny

    I'm using Lov Map to populate the lov field say field A. But I need to populate another field say field B based on the value selected in field A.
    to give an example of my requirement. Consider a view object having attributes col1,col2,col3 and having following data.
    col1--col2--col3
    1-----a-------x
    2-----b------y
    3-----c------z
    I 'll populate the lov of field A with values in col1. when user selects value 1 in field A. automatically field B should show value 'a'. If user selects value 2 in field A, field B should show value 'b' so on.
    Thanks
    Sunny

  • Return a value based on dropdown list

    I am a newbie in making PDF form and had recently started working with Live cyle to create a fillable form and managed to create a usable one patterned with the sample Purchase Order Form (by trial and error) which came along with the installation. Can somebody please help me with this form.  I have a dropdown list on the ITEMS column and want it to automatically display the unit price of the item selected from the drop down list. By the way I managed to make the table flowable.

    http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/

  • Populate repeating table based on task list - Need the experts out there!!!!

    Ok I will try to explain this as best as I can.
    What I have:
    task list (out of the box, with 1 calculated field)
    form library (customized using infopath)
    ....and a headache ;)
    So What ive done so far is I put in a hyperlink in the infopath form to the task lists newitem form "click here for new task" . I have the title of this newitem form prepopulated based on the form library item. For example, if you open up a form
    from the form library Titled: Test Entry, and has an ID of 5. The newform title of the task list will read "Test Entry | 5 ". So its title | ID. I then have a calculated column to take the right 3 characters of the title, so it prints out the ID.
    So pretty much I have a title and ID that match the form library...
    now the hard part.
    Say I have 10 tasks in the tast list related to ID # 5 from the form library.
    Is there a way to create a repeating table or other solution to show these 10 tasks within the form library form? I was thinking a button to query for data from a secondary source (task list) filter where ID = current Item ID. then have it set a fields value???
    Anyideas???

    Hi,
    Here's an idea. When you are creating the task, populate a ReferenceID field in the task list with the item ID of the form library list. In this form, create secondary data connection to the task list and include the fields that you want to show. Drag the
    group on the form, it will create repeated section with controls. Create a formatting rule on the section, condition where ID!=ReferenceID, Hide this section.
    This will display the repeating data from the Task list where ReferenceID is = ID and hide all others.
    Another variation would be to Filter the Data Connection itself and add the condition in the filter (ID=ReferenceID). Hope it helps.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • How to get the keys for a field in the dropdown list?

    The dropdown list of payment terms on an account is unfortunately very big, containing al lot of different values, in our system and therefore very confusing for the user working with Web UI version 5.2 to pick the right one. The keys (code like e.i Z077 or ZO23) are not stated in the list available for user. Is there any way in the system to flag if the different fields should show boths the keys(codes) and the description of the values in the field as Payment terms, etc.
    In the ERP SAP Gui it is possible to activate if you want the keys should be shown in all drop down list.
    If this is not possible for all the fields at one time, what can be a solution to have the keys in the drop down lists, any suggestion will be very valuable for us.
    Kindly regards
    Camilla

    HI Joost
    No it is not that simple, that is not a solution for us. The fields are maintained i our backend system and replicated to CRM, and these fields descriptions are also printed at Order confirmations and invoices, and we do not want the keys that do not give any meaning  to be visible to customers.
    BR
    Camilla

  • Problem in mapping dropdown list  values with the queries

    hi,
    I am building a simple applicaittion of currency conversion.
    The scenario :
    I have a input form with a dropdown list and a input field to enter the amount
    I have created the drop down list with the respective details
    Value   Desc
    1          dollarToeuro
    2          euroTodollar 
    when the user selects the first option in the drop down list and then enters the value and gives a submit -> the conversion takes place
    but evrytime i select the second option --> the application hangs..
    i have given a guard condition in the submit action for each if the query as LIKE(@option,"1") OR LIKE(@option,"2") for the respective queries.
    Please can someone tell me where i am going wrong???
    Regards,
    Vaishali

    Hi ,
    what is the need of ur gaurd condition there?
    and try to run the model without that guard condition.
    Regards,
    Govindu

Maybe you are looking for