Help with If statement in menu drop down

Hello

I'm not too familiar with the implementation of the custom scripts and I was wondering if someone here might be able to help me. I'm figuring a discount in the form of price value if the customer applies for a military/senior discount, but if the customer is not applicable I want the field to calculate the total without factoring in a shed.

I took a screenshot and circled the field that concerns me in red. If someone could help I would be very happy!

PricingFormPDF.jpg

Suppose that the names of the fields are "Subtotal", "Discount military" and "military discount amount.

You can use this code as the custom of the latter calculation script:

if (this.getField("Military Discount").value=="Yes") event.value = Number(this.getField("Subtotal").value) * 0.05;
else event.value = "";

Tags: Acrobat

Similar Questions

  • Help! items in a menu drop-down appears in the drop-down list all the boxes form

    I created an order form with a list of product selection

    to create the form more easy, I copied the premiera and glued to the bottom of the page (so many elements can be ordered on a single page, each item on a new line)

    However, when I use the form and make my selection of a line, all lines show the same thing...

    How can I fix.

    You must rename the fields that you copied so that they each have a unique

    name.

  • Filtering Page master/detail with a menu drop-down

    Hey there!

    I'm going to build a Web site where I have the list of some products on a master page and can be clicked to go into details.

    I do it through the Insert > data objects > page master detail and it works very well...

    but I can't filter the results of the master page with a menu drop-down.

    Can anyone help? I'm in a bit of desperation ;-)

    Thank you

    Jaume

    Yes, this is what happens - you will be variable on the page of search results page. The variable name is what you called the drop, as MyDropDown. The value is what is the value of the selected item. So, now on the results page, create your recordset. As we use only a variable as a filter, use the simple mode. Working up and down in the dialogue window, name the Recordset, select the connection and the table.  Below, yo have four entries/selections to make. Select the database column that is filtered, in the other, select '='. Below on the left select "Variable form". The text box to the right of that will be pre populated with the name of the column. Replace it with the variable name, the name of the drop-down list on the page of research - such as "MyDropDown", without the quotes, or anything else. Click Test and you will be presented with a window asking for a value - enter any value that is contained in the menu drop down and ensure that the recordset object gives results and only records with that value. If it works, save it and're you good to go. If this isn't the case, then we will do some troubleshooting.

  • Display / hide subforms with menu drop-down does not not for no discernible reason

    As far as I can tell, I seem to do everything right:

    Form1. Form.MainInformation.OR - StationeryType:exit - (JavaScript, client)

    If

    (this.rawValue == 'Visiting card') { }

    Form1. Form.BusinessCardInformation.presence

    = 'visible';

    }

    on the other

    If (this.rawValue == 'Header') { }

    Form1. Form.BusinessCardInformation.presence

    = 'invisible';

    }

    Is there something inherently wrong with this code? It does not work - I want the "calling card" subform to disappear when the "calling card" is not selected and reappear if it is.

    Hello

    Also, check the following:

    • Check form is saved in XML form dynamics in the Save as dialog box.
    • Make sure the menu drop down doesn't have a limit value / specified in the object > Binding tab.
    • I would drop the second "ElseIf" and just run with a 'other '. It seems only two choices, then the principal if the declaration will capture a condition and the other with the second exit.

    Hope that helps,

    Niall

  • I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not display in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not appear in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    You must save the spreadsheet containing the new date as a model format and use this custom template for each new spreadsheet where you want that this date format personalized at your disposal.

  • New Firefox doesn't have a history of menu drop down reliable - help!

    I've just upgraded to the latest version of Firefox and makes a few versions that I did that. An important feature that I use in my work is now gone! I need to be able to work my way through screens of 3-4 on our Web site, and then return to the first screen to enter a different search term, spend 3-4 screens, go back to the first screen for a new period of research, etc.. Because of the way our system is set up it is not possible for me to simply mark the first screen - I need to come back as it was, over and over again.

    Help, I can't do it now! Used to be I could pull down a menu drop-down 'history' from the back button, but it is no longer possible. The list of actual history, when I go to him in the menu does not list for just the page history that I am on, for some reason any and does not give me the link to the screen, that I need to come back.

    It's very very frustrating - it looks like a feature was removed, and I need this feature to do my job effectively. Can you help me to add this back to the next version of Firefox or to let me know how I can go back to the previous version if I use this feature? Please - thanks.

    The arrow to open the history tab of the previous buttons and following was removed in Firefox 4 and later versions.

    Use one of the following methods to open the tab history list:

    • Right-click on the back or next button
    • Press and hold the left button of the mouse on the active back or forward button until the list opens

    You can watch this extension:

  • AnyConnect with several profiles of connection and menu drop-down

    Hello world

    I configured anyconnect with two profiles of connection and group policies.

    Connection profiles and group policy have the same host name say xyz.com.

    need to know which configuration should I do so that when I connect it should show

    under option group choose the connection profile from the menu drop-down?

    Concerning

    Mahesh

    Mahesh,

    When you build the connection on the SAA profile there is a section in the Advanced section of "group Alias/group URL. Complete on the names you want and enable them. You should then see the two selections on the AnyConnect profile drop-down list.

    In the cli, it looks something like:

    tunnel-group Group1 webvpn-attributes
    enable-alias group Group1

    tunnel-group group2 webvpn-attributes
    Group-alias group2 enable

  • My panels are not displayed when I click on it in the menu drop-down windows. The box appears but not the Panel. Can anyone help?

    My panels are not displayed when I click on it in the menu drop-down windows. The box appears but not the Panel. Can anyone help?

    Try to reset your preferences using Cmd (LTRC) - Opt (Alt) - move when restart you the version of AI. Did you once two monitors?

  • Mobile side.  Using the drop down of your video.  I once put some text on the Mobile page the Menu drops down, but behind the image.  When I remove the text box the menu works correctly.  This also happens with a HTML code placed to Paypal.

    Mobile side.  Using the drop down of your video.  I once put some text on the Mobile page the Menu drops down, but behind the image.  When I remove the text box the menu works correctly.  This also happens with a HTML code placed to Paypal.

    Please check layers panel and put in place the menu item in the list, you can use the layers panel and move up or attempt to move the content.

    If there is still the same, then download a few screenshots of the design view.

    Thank you

    Sanjit

  • How to create a context-sensitive help when you move a field/menu drop down message

    Hello

    Anyone know how to create a message dialog box helps to appear when a user hovers over a field, a menu drop-down or a subform?  Rather than create a context-sensitive help. I want to be able to give the user a hint what to do they have their mouse over a part of the form.

    Thank you for your help.

    Best regards.

    You can make the text in the tool tip box in the accessibility to this palette.

  • How can I create a menu drop-down list dynamics that controls two separate drop-down lists?

    Hello

    I could use help decipher how to control 2 separate drop-down lists ('b' and 'c') through the value selected in the main drop-down menu (that is, 'a').

    My script worked perfectly to control another menu drop down, however I can't seem to properly control the third zone.

    In my example below, what I'm trying to do is control 'Method - external' and 'Department - external', through my gout primary to the bottom of the list. The external 'method -' drop-down list works fine, it is the third 'Department - external' that I fight with.

    For example, if 'Theft' is chosen in the first drop-down menu, I want 'Method - external' to display the series points and "Department - external" to display a different set of items. If 'Cyber Crime' is selected in the main menu down, then the external 'method' - set items will change and the external "Department -" will indicate N/A.

    With the following script - no matter what happens if I choose 'Flight' or 'Cyber Crime' in the first menu drop down, 'Cyber Crime' n/d game elements are displayed in the external "Department -" drop-down.

    I apologize if this is hard to follow - it is certainly difficult to explain. I hope that my question came through.

    Here's my current script

    Switch (event.value) {}

    case 'flight ':

    this.getField("Method-External").setItems (["","grab and run", "shopping cart/basket Walk Out", "Possession", "Consumption", "Other"]);

    break;

    this.getField("Department-External").setItems (["","Agro", "Automobile", "Bakery", "Building materials", "Chemical", "Cleaning supplies", "Candy", "Dairy products", "Deli/Bistro", "ELECTRIC", "Electronics", "Farm equipment", "Fashion", "Feed", "Fertilizer"]);

    break;

    cases of "fraud":

    this.getField("Method-External").setItems (["", "credit card", "debit card", "Check", "Coupon", "Counterfeit", "Merchandise Return", "Price Switching", "Self Check-out", "Provider", "Other"]);

    this.getField("Department-External").setItems (["", "s/o"]);

    break;

    case 'flight ':

    this.getField("Method-External").setItems (["", 'threat of concealed weapon', 'Threat from weapon', "Verbal threats", "Acts of aggression", "Other"]);

    break;

    case 'exit and enter:

    this.getField("Method-External").setItems (["","Smash and Grab - vehicles", "Smash and Grab - pedestrian", "forced entry", "Unauthorized Keyed", "Other"]);

    break;

    case 'mischief ':

    this.getField("Method-External").setItems (["","graffiti", "Damage", "product a manipulation", "Other"]);

    break;

    case "Cyber Crime":

    this.getField("Method-External").setItems (["","Malware (Virus)", "Phishing", "Others" "]);

    break;

    this.getField("Department-External").setItems (["", "s/o"]);

    break;

    }

    Thank you

    You have a few break statements that should not be there. Try this:

    Switch (event.value) {}

    case 'flight ':

    this.getField("Method-External").setItems (["","grab and run", "shopping cart/basket Walk Out", "Possession", "Consumption", "Other"]);

    this.getField("Department-External").setItems (["","Agro", "Automobile", "Bakery", "Building materials", "Chemical", "Cleaning supplies", "Candy", "Dairy products", "Deli/Bistro", "ELECTRIC", "Electronics", "Farm equipment", "Fashion", "Feed", "Fertilizer"]);

    break;

    cases of "fraud":

    this.getField("Method-External").setItems (["", "credit card", "debit card", "Check", "Coupon", "Counterfeit", "Merchandise Return", "Price Switching", "Self Check-out", "Provider", "Other"]);

    this.getField("Department-External").setItems (["", "s/o"]);

    break;

    case 'flight ':

    this.getField("Method-External").setItems (["", 'threat of concealed weapon', 'Threat from weapon', "Verbal threats", "Acts of aggression", "Other"]);

    break;

    case 'exit and enter:

    this.getField("Method-External").setItems (["","Smash and Grab - vehicles", "Smash and Grab - pedestrian", "forced entry", "Unauthorized Keyed", "Other"]);

    break;

    case 'mischief ':

    this.getField("Method-External").setItems (["","graffiti", "Damage", "product a manipulation", "Other"]);

    break;

    case "Cyber Crime":

    this.getField("Method-External").setItems (["","Malware (Virus)", "Phishing", "Others" "]);

    this.getField("Department-External").setItems (["", "s/o"]);

    break;

    }

  • Cannot use my address bar. Press enter, nothing happens. Click on menu drop down and it will not go to the address

    Address bar does not work. Will not open search or site Web open, even when I click on addresses in the menu drop-down. I tried to start in safe mode and I tried Firefox refreshing. I even tried to reinstall Firefox. Any suggestions?

    I did a system restore, after seeing some other problems with my computer. Now, it seems to work correctly. I think that refreshing Firefox may not have worked until I did the restore, because he tried to open my previous session, even after rebooting. When I started after restoring the system, is no longer a bookmarked or saved passwords. So I'm not sure what I did than the fixed, but it seems to work now. Thanks for all the help

  • addresses of Firefox in the navigation bar are missing/replaced by different menu drop down

    When I type in an address, the drop down menu no longer contains the same list of addresses as always. Instead, there is a list of locations (less actual addresses www.com beneath each) in bold and some places are repeated in the menu drop down but take me to a different site. Its a game guessing where Im going when I click on one. Next to each entry, there is a magnifying glass icon which was not there before. I was search playback for almost 3 hours trying to trouble shoot the issue and Ive tried to restore default with no luck. It's really annoying me... Any suggestions?

    It can happen because your some bars of tools and malware too...

    Hello

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • symbols of site little left of the names of sites in favorites have disappeared in the menu drop-down

    These are the small individual square symbols identify the Web site. They are present when checking under "Show all bookmarks" menu drop-down [which opens the info files], but do not show that they were previously in individual link lines in the menu drop-down.

    Hi nateich2,

    You should take a look at this article which discusses some of the problems with the latest version of Firefox.

    There is some information here that should help you solve your problem. Fortunately, this is a very easy solution.

    Hope this helps!

  • 660 x Schematic of the low resistance of the menu drop-down

    The 660 x data sheet mentions that the State of market has an entry (high Z) with low pull-down, but I can't find a diagram with this low resistance value of the menu drop down.

    I want to measure a clock signal on my DUT without loading or distort the signal, so I intend to use a buffer. I am concerned about the current required drive to overcome unrolling integrated resistors and the requirements of threshold as a result of my meter PXI-6608.

    If anyone has a link to the recommended buffers, levers of level or an article in the knowledge base with an example circuit, it would be much appreciated!

    http://www.NI.com/PDF/manuals/372141b.PDF

    It was working fine. I look forward to adding to my next PCB ITA.

Maybe you are looking for

  • iOS 10.02 draining iPhone battery 6.

    I've recently updated to iOS 10.02 on a 64 GB Iphine 6. Since the update, my battery life is much shorter than before. I tried all the usual: updating in the background app off, low battery, reduce the brightness of the screen, e-mail mode to extract

  • No backups to my Time Machine...

    I changed provider from BT to Virgin Media internet services since July 5 and since then my Time Machine did not have all the backups as it usually does in a reasonable time. I tried to change the USB ports on the capsule in order to get this to work

  • Improvements of the SSM/SDM

    I don't know if there is a forum for the SSM. SSM is part of the SDM so this forum seems OK to me. If there is a forum separate SSM please let me know.Sorry if I look like a b * but I don't see any alternative to SDM/SSM. I think that the SDM is good

  • IRQL_NOT_LESS_OR_EQUAL STOP: 0x0000000A(0x00000166,0x00000002,0x00000000,0x804FAADA).

    I have a laptop with Windows XP Professional. Every time I have shut down or restart my computer, I get a bluescreen IRQL_NOT_LESS_OR_EQUAL STOP: 0x0000000A(0x00000166,0x00000002,0x00000000,0x804FAADA).  Is someone can you please help me solve this p

  • Determination of stack overflow files. ???

    Help, please! What doea this mean when I stack overflow and how do I get rid of him. No case else gave a good answer.