How do I set up this calculation?

Hello everyone, this is my first post, and I'm happy to become part of the Acrobat community!
So I have been trying to create a form, and I mostly got it all figured out, except for this bit of calculation that I simply can't get to work.
This is for a purchase proposal, and I need to have it so that clients only need to fill some fields, and others are automatically calculated. There are 4 fields, let's call them Field A, Field B, Field C and Field D. In Field A, which is for currency, the client will type the proposal value, and in Field B he will type the percentage of the value in Field A that he will pay in advance. Field C is set to automatically figure how much, in currency, he will have to pay from the calculation between Field A and Field B. For example, if the client sets 100000$ in Field A and 10% in Field B, Field C will automatically say that the value to pay in currency is 10000$. Now, this was not that hard. I looked around and found a Java Script that does just that.
Now, Field D is supposed to tell the client how much, in currency, he will pay in the final contract, after he has already payed the 10% advance. So, in other words, Field D should be Field A minus Field C. So the question is, what Script do I need to make this calculation automatically after the client types in the values of Field A and Field C?
I hope I was able to explain it properly.
Thank you so much!

Where is the script located?
What is not working about this script?
Have you looked at the JavaScript console for errors?
Try the following script in Field D:
function GetField(cName) {
var oField = this.getField(cName);
if(oField == null) app.alert("Error accessing field named " + cName, 1, 0);
return oField;
} // end GetField funciton;
// custom calculation for Field D;
// define some feild names;
var cTotalPayment = "Field A"; // total payment due;
var nPercentDown = "Field B"; // percentage down (assumes non-decimal value);
var nDownPayment = "Field C"; // downpayment amount;
// end of field names
// some debugging help;
console.show();
console.clear();
console.println("Total Payment: " + GetField(cTotalPayment).value);
console.println("Percent for downpayment: " + GetField(nPercentDown).value);
console.println("Downpayment amount: " + (GetField(cTotalPayment).value * (GetField(nPercentDown).value / 100)));
console.println("Balance due: " + (GetField(cTotalPayment).value - (GetField(cTotalPayment).value * (GetField(nPercentDown).value / 100))));
// end debugging help;
// compute the downpayment amount;
GetField(nDownPayment).value = GetField(cTotalPayment).value * (GetField(nPercentDown).value / 100);
// compute balnance due;
event.value = GetField(cTotalPayment).value - GetField(nDownPayment).value;

Similar Messages

  • HT3669 Since I starting using my MacMini (2011 version) I have not been able to print double sided from my HP Photosmart plus - there is no option for this in the Printer dialog box as there was in the similar dialog box on my PC. How do I set up this opt

    Since I starting using my MacMini (2011 version) I have not been able to print double sided from my HP Photosmart plus - there is no option for this in the Printer dialog box as there was in the similar dialog box on my PC. How do I set up this option?

    1. You did not get an error message telling you that your iPhoto library was getting full. You got a message telling you that your HD was getting full, right?
    OS X needs about 10 gigs of hard drive space for normal OS operations - things like virtual memory, temporary files and so on.
    Without this space your Mac will slow down as the OS hunts for space on the disk, files will be fragmented, also slowing things down, apps will crash and the risk of data corruption - that is damage to your files, photos, music - increases exponentially.
    Your first priority is to make more space on that HD. Nothing else can be done until you do.
    Purchase an external HD and move your Photos and Music to it. Both iPhoto and iTunes can run perfectly well with the Library on an external disk.
    Your Library has been damaged from being run on an overfull disk.
    How much free space on it now?

  • HT5312 It says i will have an option to send an email to my "rescue email" because i forgot the answers to my sequrity question...How do i set up this "rescue email"

    How do i set up a rescue email address??

    You can't after forgetting the answers and need to contact Apple. Use the link to contact the iTunes Store staff in the 'Additional Information' section of that article.
    (90055)

  • How do i set up this backup strategy?

    Hi All,
    I am currently running Oracle Suggested Backups using RMAN. I set it up through enterprise manager. The Oracle suggested Backups took a level 0 backup two weeks ago and has been doing incremental backups everynight. Here is the RMAN script that runs nightly:
    Daily Script:
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    I want to change this up. I want to take a full hot backup every week (sunday) and then do incremental backups each night. I also want to backup the archive logs and delete any files that are outside the retention policy. I want to keep 14 days worth of backups.
    I want to set this up in enterprise manager. Do i have to set one weekly job on Sundays to take the full lev0 backup and then another job to run nightly to take the incremental backups? Can someone please put me on the right track?
    I want to conserve disk space and currently all my archive logs and backup files are not being deleted.
    Thanks,

    Hi
    Personally I don't think that it' s a good idea to set a retention polity to 14 days and delete the archive log if older than a week.
    If you don't want to delete the archive logs that your are just backing up you can remove the world delete input from the above script.
    run {
    allocate channel ch1 type disk format '/db/ARON/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';
    backupincremental level 0
    database
    plus archivelog;
    backup current controlfile;
    backup spfile;release channel ch1;
    }If the backup was successful than I suggest you to program a script (UNIX shell ...) that delete the archive logs.
    Using rman you can execute command like:
    RMAN> delete archivelog until time "sysdate - 7" backed up 2 times to device type disk;
    released channel: ORA_DISK_1
    released channel: ORA_SBT_TAPE_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=15 devtype=DISK
    specification does not match any archive log in the recovery catalogor
    RMAN> delete backup of archivelog until time "sysdate - 7" device type disk;
    released channel: ORA_DISK_1
    released channel: ORA_SBT_TAPE_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=15 devtype=DISK
    List of Backup Pieces
    BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
    3222    3221    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_572546229_217_1_6ph20n5l_1_1.bck
    3242    3240    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_inc1_ARON_573346395_221_1_6th2p4ir_1_1.bck
    3243    3241    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_inc1_ARON_573346395_220_1_6sh2p4ir_1_1.bck
    3262    3261    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_inc1_ARON_573346438_224_1_70h2p4k6_1_1.bck
    3375    3374    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_580506186_229_1_75h9jkia_1_1.bck
    3398    3397    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_580506438_230_1_76h9jkq6_1_1.bck
    3405    3404    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_580506464_231_1_77h9jkr0_1_1.bck
    3445    3443    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_581273242_233_1_79hab1kq_1_1.bck
    3446    3444    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_581273242_234_1_7ahab1kq_1_1.bck
    3465    3464    1   1   AVAILABLE   DISK        /db/ARON/BACKUP/RMAN/backup_ARON_581273291_237_1_7dhab1mb_1_1.bck
    Do you really want to delete the above objects (enter YES or NO)?Bye, Aron

  • How would I set up this table of Contents?

    I want a TOC that looks like this:
    Chapter title.......................................author's name......................................page number
    Is this possible? I have always done it manually.
    Thanks
    Ian

    I can give you something that will be a little less manual, although not completely automated. It might seem like a lot of work, but it only takes a bit of time in the setup, and after that, it's all copying and pasting. Have a look at this screenshot:
    I put in some placeholder text, created a headline style, and another style (the 6pt magenta text) called For TOC. I put in the title and author placeholders, separated by a tab and set the width of the text frame to something just below the width of the text frame that holds the body text, and I collapsed the height to fit the text. I set the placeholder text frame to non-printing with Window>Output>Attributes, copied the frame, and pasted it just after the headline paragraph (with a space between the headline and the now-anchored placeholder frame).
    I then set the inline object to a custom position so that no matter where the headline was on the page, the anchored frame would be at the top of the page away from the spine. And, because the inline frame is set to non-printing, it won't show up on printouts or when exported to PDF. Once that's all set up, just copy the anchor and the space (you can use the story editor to make sure you are selecting just those two things) and paste them next to any headlines (or titles, in your case). You then copy the titles from the main text and paste them over the Title in the placeholder (I used Edit>Paste Without Formatting so that the style of the headline would change to the style of the placeholder). You would also type in the name of the author when you are entering the title into the placeholder.
    In the table of contents, you would select the For TOC style, instead of the headline style for inclusion into the TOC. Make a paragraph style for the actual TOC, and set the tab stops there, and you will have:
    Title..............Author................Page #
    The placeholder will travel with the title, so as long as you remember to update any text in the placeholder if you choose to update the titles, you should be good to go.

  • How would you set up this network?

    ingredients: Mac Pro, Macbook Pro, Apple TV, 1 G airport express, 1 N airport express, Airport Extreme Bass Station, 1 medium sized 1 floor apartment.
    the current problem is that the network runs perfectly except for my main computer - the Mac Pro (1 year old) which always disconnects and gives me constant problems. would be nice for everything to work well so i can finally play music throughout the place.
    wireless N? G? mixed? extend the wireless signal? interference robustness? and most importantly - how can i choose a channel that i know the neighbours aren't on?
    any help appreciated! this has been driving me mad for 6 months now

    thanks for the help! by going N I lose 1 airport express but it's worth it if it will fix things.
    Like many people on here i have changed settings 9000 times to try and get the airport expresses from dropping out when streaming to them.
    The main problem is the airport card in this Mac Pro - I think it is a bad one.
    Running a cable would fix things probably although I dont really want cables running through the apartment, I think I will do this to avoid any further headaches.
    Thanks for the input! Maybe in 1 week I will be able to buy a new Mac Pro with a new Airport card - depends on the expo!

  • My Firefox system seems to automatically use a town to provide information those automatic banner displays, but it is NOT my town. How do I set or reset this feature to be my hommetown versus another?

    Several different advertisers seem to use an embedded setting to display a map within their banner display, however, it is not my town, but one close by.
    A couple weeks ago, a Firefox window popped up, without my involvement, asking me to verify certain information on it. It seemed to be a 'general settings' window from Firefox and I noticed it had the name of the 'other' town listed in the field labeled "Your Location" (or something close to that), so I changed it to the 'correct' name of my hometown and closed the window properly.
    This action caused no issues (i.e. it wasn't a Trojan virus or anything) and seemed to have cleared up the incorrect banner maps, maybe as I didn't pay too close attention recently. However, today I again noticed the system using the 'other' town's name when displaying those banner map ads.
    How can I set/reset this setting to the name of my correct 'home'town?

    You can automatically save downloads without seeing the Open/Save/Cancel dialog in the Options:
    orange Firefox button (or Tools menu) > Options > General > "Saves files to"
    However, I can't think of a way to have the Open/Save/Cancel dialog always default to Save. I think mine suggests whatever I did last for the same type of content, but I haven't paid close attention.
    I'm out of time to address the problem with "do this automatically" but there is one suggestion for why it could be grayed out in this article: [[Change what Firefox does when you click on or download a file]].
    Is it possible you had a download-related extension before? To compare settings and extensions, please retain the Old Firefox Data folder on your desktop. Aside from checking the extensions in there, it would be interesting to run a text file comparison on your currently active prefs.js file and your old one in that folder.

  • How can I set up an E-mail address?

    Hello,
    I just buy a mac book. I have created an e-mail address for i chat (mac.com); I want to use the same address to read my E_Mail, therefore I tried several times to set up this new address in the software "Mail" but it does not work.
    I have see that the mobileme address are not used anymore...but how can I set up this new E-mail adress?
    Thanks to help me
    Regards

    Try changing the email address using https://appleid.apple.com/
    If you can't change it with that site, you'll have to create a new account.

  • HT4356 How can I set up a Canon MX410 to print from my iPad?

    How can I set up this printer on my iPad?

    If it is not an AirPrint enabled printer
    iOS: AirPrint 101
    you need an app to print via. Search the App store. Start searching for a  cannon printer app and general print app like Print Central

  • URGENT! How do I set up a cogeco email account?

    I have a Cogeco email account, [email protected] I need to know how I can set up this account to receive email on the iPhone. If you have any information that would greatly appreciated. Also what would I use for the incoming and outgoing servers?
    Thanks.

    Since the email is cogeco.net would the server be pop.cogeco.net, or still .ca?
    Thanks

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • HT1386 I have a new iPhone and want to purchase a ringtone on iTunes.  It keeps asking for answers to a question that I did not set up and don't have the answer for.  How do I get pass this dilemma?

    I have a new iphone and want to purchase ringtones from itunes.  Itunes is asking answers for security questions I did not set up and I can't answer them.  How do I get past this to be able to purchase.  I can purchase songs on my MAC and sync but itunes doesn't give the option to purchase ringtones on the MAC, just the iphone.

    If the email hasn't arrived after a few hours and isn't in a spam filter, you need to ask Apple to reset your security questions; this can be done by phoning AppleCare and asking for the Account Security team, or clicking here and picking a method, or if your country isn't listed in either article, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (106007)

  • I have an Ipad 2 and here is what I am trying to accomplish.  On my laptop I connect to a remote desktop connection to access a shared program we use for reporting.  How do I set up my Ipad to access this remote server?  Thanks for the help.

    I have an Ipad 2 and here is what I am trying to accomplish.  On my laptop I connect to a remote desktop connection to access a shared program we use for reporting.  How do I set up my Ipad to access this remote server?  Thanks for the help.

    Close ... before going for a specific Cisco app ... lets find out some details:
    Host we need more details:
    What is your server environment (Windows Server, or Mac OS X Server, or Linux)?
    What security is implemented in your environment - as what is restricted (RDP for all or specifc credentials on all machines? Are you part of local admin group to the server you wish to connect)?
    Does your environment Support CISCO IPSec connection? If so use Settings> VPN and IPSec tab to enter VPN details, if not then go with above suggestion. IF your restricted to RSA then either built in VPN settings or 3rd party app for RSA would suffice.
    Finally, there are many RDP applications out there I use "Mocha RDP Light" (free minimal ads when launched not when connecting).

  • Tabs only open in a new window. Ctl T opens a new window NOT a new tab help-last update this problem started. How do I set FF back to open tabs in 1 window

    Tabs only open in a new window. Ctl T opens a new window NOT a new tab help-last update this problem started 2 days ago. How do I set FF back to open tabs in 1 window?
    There is no plus sign and going into optins and changing settings has not worked. I have uninstall FF and reinstall-keeping my personalization-and that was no help.
    Right clicking on FF Icon to open a new tab, or going up to FF drop down tab and clicking on new tab both do not work.
    Help everything opens a new window not a new tab. there seems to be no way to reset this or to chose a different optin. I just downloaded new tabs at end addon and it didn't do a thing.

    as a first troubleshooting step - does it work like normally when you open & run firefox in [[Safe Mode|safemode]] by pressing the shift key while you open firefox (all other instances have to be closed before)...

  • "I have pages 5.1 but when I try to open a page on my desk top.. a message comes up - You need a newer version of pages to open this document.  How do I set my computer to open a page?"

    "I have Pages 5.1 but when I try to open a page on my desk top.. a message comes up - You need a newer version of pages to open this document.  How do I set my computer to open a page on my desktop?"

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Pages 5 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Note: Apple has removed over 90 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

Maybe you are looking for

  • Custom clearing agent payment issue

    Dear experts Purchase  order  was created  and  the  material was  received  on   port (imports). custom clearing  agent has  cleared  the goods. now   custom   clearing  agent needs  his  charges. the  inv  from vendor with reference to PO is not re

  • Mail w/attachments are received in body of mail

    I have an imac G5, Mac OS X (10.5.8), mail 3.6.  When I send an e-mail with an attachment, either a photo or a document, to a PC user, old or new, the attachment is received and shown in the body of the mail.  There IS NO attachment;  NO paper clip; 

  • Webutil_file_transfer.as_to_client_with_progress returns false

    Hi, I have the following problem: I want to transfer a file from the application server to the client. I use the following code: DECLARE l_cache_filename VARCHAR2(150) := 'Q:\OracleReportsTemp\123.html'; l_report_desname VARCHAR2(150) := 'C:\pcedownl

  • Workspace & Web Analysis save reports

    Hi, I have a question in what please all the report to web analysis and workspace are saved?,in the application web?

  • Version 8 Compiler and Distribution Expert

    I have been attempting to locate the download for Version 8 Compiler and Distribution Expert.  I've tried to seach the downloads area but am not able to get more than 10 responses.  After pressing the next page button, my browser is returned to the d