Need help with javascript...

I have a form that I want to send. When it creates the email, I have a script which inputs e-mail sender, a subject line that between the body of the text, including the name of the employee as well as the date and the name of the person completing the form from the "empName" field specified in the field 'weekend '. I want to add the totals for each line (regular, vacation and sick). For some reason, the script stops when I try to add row grand totals. When it works, here is my script:

var oDoc = event.target;

oDoc.mailDoc({
bUI: true,
cTo: "[email protected]",
cCC: "[email protected]",
cSubject: "Weekly Employee Time Summary for "+empName.rawValue,
cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue
});
 

If I just add one line totals, the Send button does not work. Here is the code with the addition of a line total:

var oDoc = event.target;

oDoc.mailDoc({
bUI: true,
cTo: "[email protected]",
cCC: "[email protected]",
cSubject: "Weekly Employee Time Summary for "+empName.rawValue,
cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue +". Vacation Total: "+vacTotal.rawValue
});
 

Any ideas why it's a failure? Attached is the file itself

https://drive.Google.com/UC?export=download & ID = 0B3ZhSiIWrwvWUUhfa0hCZlJFX00

You must write the path to the object, you cannot access the object if it is in the same subform or if it has a similar parent

You should write this to access your total value inside the table

Table1.vacation.vacTotal.RawValue

Tags: Adobe LiveCycle

Similar Questions

  • Need help with Javascript for Acrobat 9 Pro

    Hello

    I have created a PDF form in Adobe Acrobat 9 of Profession.  Not having not much experience with Javascript, I found this forum very helpful and have many examples of script used to other issues, I had.  I was hoping that someone could help me with the following script, I tried many variations, cannot operate.

    var ratio = this.getField("ratio").value
    concentration of var = this.getField("concentration").value
    var result = this.getField("result").value
    If (ratio.value > = 50.00)
    {result.value = 'PASS' ;}
    If (ratio.value".value > = 40.00)
    {result.value = 'PASS' ;}
    If ((concentration.value ==61) & & (ratio.value > = 49,25))
    {result.value = 'PASS' ;}
    If ((concentration.value ==61) & & (ratio.value > = 39.25))
    {result.value = 'PASS' ;}
    If ((concentration.value ==62) & & (ratio.value > = 48.50))
    {result.value = 'PASS' ;}
    If ((concentration.value ==62) & & (ratio.value > = 38.50))
    {result.value = 'PASS' ;}
    on the other
    {result.value = "FAIL" ;}

    It's just a piece of code, concentration values run from 61 to 99 and the value of the ratio varies for each value of the concentration, there is a high ratio and a low ratio.  The result of this field to complete the field of results with a SUCCESS or a FAILURE.  This isn't working... any help is greatly appreciated!

    If this script is attached to the Calculate of the "result" field event, if I understand correctly the logicm code should be something like:

    // Get a reference to the ratio field
    var ratio = this.getField("ratio");
    
    // Get a reference to the concentration field
    var concentration = this.getField("concentration"); 
    
    // Default
    var res = "FAIL";
    
    if (ratio.value >= 40.00) {
        res = 'PASS';
    }
    
    if ((concentration.value == 61) && (ratio.value >= 39.25)) {
        res = 'PASS';
    }
    
    if ((concentration.value == 62) && (ratio.value >= 38.50)) {
        res ='PASS';
    }
    
    // Set this field's value
    event.value = res;
    

    If the code is placed elsewhere, you must indicate the location.

  • Need help with JavaScript button to save as an event.

    Hello

    I use Adobe Acrobat X Pro and am totally new to scripting of forms in Adobe (completely new to Adobe Acrobat as well!).  There is a backup on a form button that opens the Save dialog box under using a trigger (the mouse upward) and action (execute a menu item - file > save under... > PDF...) and it works fine, however, I want to now use javascript to change the behavior of the button so that it uses a trigger (the mouse upward) and action (run a JavaScript script) , and I want that JavaScript to combine the text values in two form fields (a location drop down and a date text field) and use this string concateneated + ".pdf" as the file name when he opens the Save as dialog box.  Make sense?

    This is what I added to the button as a JavaScript so far I use a test at this time string ("NewFile.pdf") and add the string that is concatenated to the script after that I know that the script works as it should.

    var NouveauNomFichier = "NewFile.pdf";

    var pathArray = this.path.split("/"); "

    pathArray.pop ();

    pathArray.push (newFileName);

    this.saveAs(pathArray.join("/")); "

    Up to present two questions:

    1. when I click the button nothing happens, no dialog Save as or whatever it is.

    2 when I check the properties of the button depending on the Actions tab shows property to select Action "Performing a menu item", even if I chose previously 'run a JavaScript '.

    Thanks for any help!

    The saveAs method will not work if the code is placed in a key event. It would need to be in a JavaScript file to the folder level, inside a function of confidence, inside a block of app.beginPriv/app.endPriv. Each user must have the JavaScript file to the folder level. The button can then call the code in the file. It will be possible for users of the form?

  • Need help with Javascript to get the value of standard report column

    Hi all

    Apex 3.1 version

    I have a query SQL (editable report) region where I need to do validations using a process of OnDemand and javascript. For this posting, I need to use the serial number and id of this same report line item. The function is called when the serial number is changed. I can get the serial number easily because it is a text field, however, the item id is a standard report column (which actually a text field or hidden gives me a checksum error, long story). How can I get the value of the standard report column to set the value of an element of the Application to use in my process of application as well as the serial number? Here is my code below.
    <script>
    
    function f_ValidateSerial(pThis)
    {
        
      // The row in the table
    
      var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    
        //alert('Row is '+vRow);
    
    
      // Display the serial number
        //alert('The Serial Number is '+html_GetElement('f21_'+vRow).value);
    
      
     var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0);
     get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value);
     get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value);   // Here's where I need to get the item id to set application item!!
     
     gReturn = get.get();
     
    if (gReturn)
        { 
          alert(gReturn);
        }
     
      if(gReturn)
        { 
          html_GetElement('f21_'+vRow).value = '';
        }
               
    }
    </script>

    Hello

    Ok

    Item ID is standard report column.
    If you enter this Expression HTML column

    #ITEM_ID#
    

    I guess that the substitution of column item Id is #ITEM_ID #.

    Now, you have hidden input form that is not submitted.
    Then in JavaScript

    get.add('F101_INVENTORY_ITEM_ID',+html_GetElement('item_id_'+Number(vRow)).value);
    

    Kind regards
    Jari

  • Need help with Javascript automated e-mail

    I am trying to modify a form to add a button that takes the values of the fields that will be filled in by the user and then send an email using these fields

    currently I have the following script:

    var A = xfa.resolveNode("topmostSubform.Page1.Work_Order__").rawValue;
    var B = xfa.resolveNode("topmostSubform.Page1.NOMENCLATURE").rawValue;
    var PPC = xfa.resolveNode("topmostSubform.Page2.Email_Address_PPC").rawValue;
    void var = 'work created order. "
    var msgBody = "Order of work" + A + "\n for the" B + "program has been created"; "."
    app.mailMsg ({}
    bUI: false,
    cTo: PPC,.
    bassujetti: void.
    CMSG: msgBody,
    });

    Thanks for your help,

    John

    Hi John,.

    Your script looks not too bad. Here is our generic script:

    var vEmail = "[email protected]";
    var vSubject = "A Subject for your email";
    var vBody =  "Put your body message here...";
    
    event.target.app.mailMsg({
         bUI: true,
         cTo: vEmail,
         cSubject: vSubject,
         cMsg: vBody
    });
    

    Try putting "event.target." before the app.mailMsg. Also you need not of the xfa.resolveNode, if the items, pages, and the subofrms are appointed.

    Hope that helps,

    Niall

  • Need help with Javascript calculation hidden values.

    See the problem down below. Thank you.

    Calc_Problem.jpg

    This line is incorrect:

    (TotalValB - CostBasB) = this.getField("NV_B").value;

    Replace with:

    this.getField("NV_B").value = (TotalValB - CostBasB);

  • Need help with JavaScript web application form.  Need to limit the pixels and the size of the image

    I build several forms for www.iswapusa.com and on the site, visitors are asked to upload images, I want to restrict the width in pixels max 400 pixels and size to maybe 1 MB to 3 MB of the file images if possible.  If there is a code to do this, please let me know and where do I put it on business catalyst system. to work with forms I create or even if I have to give to each form.  The forms are available from one of these pages offer commercial or Non-commercial offer.

    I found the answer to my problem.  It is not a java solution, but a simple code.  You can create in your retail or list view depending on where you want the images appear of your form will be mailed.  the answer was in a previous post, and the link is:

    Dynamically generating thumbnail images

    The code I used was:

           

           

           

  • Need help with javascript used to check the data in the mandatory radio button fields

    required_fields

    I get a syntax error (SyntaxError: missing: after the id property 17; at line 18).  I am trying to run a script to verify data in all the fields required radio button before letting the user to submit the form (or save).  Here is the code I use:

    var AllRequiredFieldsSet = true;

    for (var i = 0; I < this.numFields;i++)//loop through all form fields)

    {

    var fldName = this.getNthFieldName;

    var currentFld = this.getField (fldName);

    if(currentFld.type=="radio")

    {

    All the radios that are needed to see if the user filled their

    if(currentFld.Value=="OFF")

    AllRequiredFieldsSet = false; one of the option boxes has not been selected, this form cannot be sent

    }

    }

    If (AllRequiredFieldsSet is false)

    App.Alert ("all the required areas have not been met");

    on the other

    this.submitForm ({cURL"mailto:EMAILADDRESS@gmail.com", cSubmitAs: "PDF"});

    Miss me not all media... Any ideas on what I'm missing?

    Thank you! Judy

    These two lines should fix things:

    var fldName = this.getNthFieldName (i);

    ...

    if(currentFld.type=="RadioButton")

  • Need help with JavaScript/region templates and APEX (Show Hide region)

    I have a page that I am building where I want to use a form of a page but the swap areas (without reloading the page). In my example form, I have 3 areas I want to talk about as general, Major, Standard. I have them where they will be show and hide but the result is not satisfactory, because even if the region is hidden, the white space remains there where he was. Basically I want the form to continuous flow when the effect is that Standard replaces the more important or Major replaces the standard when you change the menu drop down.

    Link to the example on apex.oracle.com: http://apex.oracle.com/pls/otn/f?p=23948:1
    Developer Access:
    workspace: dapullia
    username: guest
    password: demo
    The application number is 23948

    Hello David,.

    Instead of the "visibility" of switching you must pass the 'view' of the 'block' to 'none '.
    If your code should be something like this (using the notation of APEX javascript library)

    $x("MAJOR_EVENT").style.display = 'block ';
    $x("STD_EVENT").style.display = 'none ';

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • I'm suddenly needing help with my browser Firefox (6.0.2)

    Hello
    I'm suddenly needing help with my browser Firefox (6.0.2)

    (OS: I use Windows XP).

    When I open the browser, I don't see is a totally white screen of white, with all the toolbars at the top.

    I know that my physical connections are very good: I have tested the modem, turned the pc market etc and I can also receive/send emails.

    This problem started today, September 8, 2011 and has never happened before.

    Is it a coincidence that Firefox itself to day before I disconnected yesterday evening? Could this be something to do with this particular new update?

    I also noticed that just before I "opened" Firefox, I now get a small box indicating:

    [JAVASCRIPT APPLICATION]
    Handl exc in Ev: TypeError: this oRoot.enable is not a function

    This never appeared before - I hope that it offers a clue has what is wrong.

    The browser not be stuck in Mode safe, said by the way.

    Of course, I can't find solutions to the problem on the internet, I don't physically see all Web sites!
    (A friend sends this request in my name from their pc)

    Any light you can throw on this problem of confusion would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.

    If the only option is to uninstall Firefox and reinstall from your site, I'm also in trouble (I can not see the internet or download).
    In this case, would you be able to send the .exe file as an attachment to my e-mail address? In the affirmative, please let me know and I'll give you more details.

    Thanks in advance.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Need help with coding for HTML5 with emergency Flash video

    Hello, need help with my coding in Dreamweaver CS5.5 for HTML5 with emergency Flash video. Not sure if the coding is correct. Do I need any other JavaScript etc.?

    code.jpg

    Another thing is that you don't have to include SWF as aid manual if you provide all 3 ogv, webm & mp4 video formats as one of these formats will certainly be played in any browser that is fully compatible HTML5.

    Still one thing you could do if you don't mind hosting your video on Youtube is to get an embed code for Youtube - in this way, you don't have to convert all the files. YouTube will do it for you and it will play on devices of HTML5 as well as supports Flash player of relief for devices that cannot play HTML5.

  • Need help with a declaration of 'IfThenIfNot '.

    Every year couple I need help with a script statement and these forums have been incredibly useful. Once more, I was hoping that someone out there had knowledge of something I am writing for a form, I need to automate:

    In the jargon of Excel that I try to write to would state so @if (("Subtotal"+"InvestigativeFee"+"PlanReviewFee") > 1000, + 100, + (("Sous-total" + "Investigativ Manar" + "PlanReviewFee") *. 1))

    What I have here is three form named subtotal, InvestigativeFee & PlanReviewFee fields.  The formula in question says it's a 'technology assessment fee"of 10% on the total part of what above mentioned 3 fields but there is a maximum charge of $100 for this tax.  The statement that I wrote above would have worked in Excel (not tested, but generally is the idea).  I was hoping someone mastering JavaScript could help me with a statement that I needed to do this work.

    Hope to hear from someone,

    Warmly yours.

    Steven L in Eugene OR

    Try the following in the custom calculation of the fresh field of evaluation script:

    Custom calculation script

    (function () {}

    Maximum package

    var max_taf = 100;

    Get the values of the field as numbers

    var v1 = + getField("Subtotal").value;
    var v2 = + getField("InvestigativeFee").value;
    var v3 = + getField("PlanReviewFee").value;

    Calculation of tax

    TAF var = (v1 + v2 + v3) / 10;

    Set this field to royalty calculated value if less than maximum, otherwise the maximum value

    Event.Value = (taf< 100)="" taf="" :="">

    })();

  • Need help with installation on Photosmart C7280 all-in-one

    I had my printer is installed and has been using the printer for 3 wireless laptops in my house.  Now, I can't even find my backup drive, so I have need help with downloading the software to use my printer and also get to use wireless.   I don't know what happened, but the fax for this printer is listed, but not the printer itself.   Help, please!

    Click here to download the software for your printer:

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?product=3204785 & LC = on & CC = US & DLC = in & lang = to & CC = US

    has chosen the appropriate operating system that corresponds to your computer and download the full software features.

  • HP laptop: need help with internet and search for things

    whenever I'm on chrome internet explore google ect and go to tab it is says unknown error or no internet connection or anything and just takes me chrome ect. I need help with this im involved in a byod class and my computer won't let me on what whatever usually it just starts out black and white and the seeds I my search request

    Yes it's a Windows 10 and it arrived already installed I'll take the other info now

  • Need help with the installation of an adapter of Palit GeForce 9500GT Super chart - 512 MB in a M2N68 (narrated

    Need help with the installation of an adapter of graphics Super Palit GeForce 9500GT - 512 MB - DDR2 SDRAM in a M2N68 motherboard (narra6). Should I disable the onboard graphics in the bios? When the card is installed, no VGA work outs and the PC does not start. Checked and recontroler implementation of the card in the PCI slot. PC is a desktop HP G5200uk PC. Windows 7 operating system.

    Hello

    The link below is a guige to install a video card in your Pc.  In particular, it seems that you will have to perhaps specify the location of the new card in the bios and save this change before you install the new card - see step 4 in the guide on the link below.  If your new card fits into the PCI Express x 16 slot, you will need to define PCI Express in the bios and save the changes.

    http://support.HP.com/us-en/document/c01700855

    Kind regards

    DP - K

Maybe you are looking for