Help with If Statement from Drop Down

Hello,
I'm not too familiar with setting up custom scripts and was wondering if anyone here might be able to help me. I am trying to calculate a discount value in a pricing form if the customer is applicable for a military/senior discount, but if the customer isn't applicable I want the field to calculate the total without factoring in a discount.
I took a screen shot and circled the fields that I'm concerned with in red. If anyone could help I would greatly appreciate it!

Let's assume the field names are "Subtotal", "Military Discount" and "Military Discount Amount".
You can use this code as the custom calculation script of the latter:
if (this.getField("Military Discount").value=="Yes") event.value = Number(this.getField("Subtotal").value) * 0.05;
else event.value = "";

Similar Messages

  • Unable to capture data from drop down list in custom added field in migo tcode at item level

    Hi guys,
    need bit help in resolving query related to custom added field in Tcode migo.
    i have added a field in migo at item level ,in this i have used drop down list
    to get data but unable to capture data from drop down list.gown through
    many blogs in scn but unable to resolve.
    Please help me out in this.
    Thanks,
    Umakant.

    Hi,
    U can use following code to fill the list box
    write this code in PBO
    In layout editor please select listbox in dropdown attribute of input field and put some fctcode attribute
    TYPE-POOLS vrm.
      DATA values TYPE vrm_values WITH HEADER LINE.
      TABLES: <ur custom Database table>.
      clear values, values[].
      SELECT * FROM <ur custom Database table>.
        values-text = <TABLE FIELD TO DISPLAY IN DROPDOWN> .
        values-key = <TABLE KEY FIELD TO DISPLAY IN DROPDOWN>.
        APPEND values.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = '<SCREEN INPUT FIELD NAME>'
          values          = values[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    Also please define the following before accessing the listbox value
    data: <listbox input field name> type <table field name>,
            <inputfield name where text to display> type string  in top include
    In PAI, select the text from the table into <inputfield name where text to display>  depending on value selected which will be called when enter key is pressed or any vale is selected

  • How do I stop the toolbar from dropping down when I load a program?

    How do I stop the toolbar from dropping down when I load a program?  When  I close a program Like world or Warcraft for example the toolbar keeps opening up when the World of Warcraft manager reopens How do I stop this for this and other programs
    I use, its really annoying and should be fixed or a setting made to stop it from doing this entirely.
    KingOfMyPC58

    Hi,
    Could you please share a screenshot here with us for better understanding this issue.
    Regarding to “other programs”, what are these programs, more detailed information would be very helpful.
    Regards,
    Yolanda
    Yolanda
    TechNet Community Support

  • If statement in drop down

    I have dynamic values in drop down menu. that contains user names. it is used to send feedback. I want that if admin logins then show all user names, else show only 'admin' in the drop down box. how can I use if statement in drop down?
    ResultSet rset     = SELECT USERNAME FROM QMSUSERS;
         while (rset.next()){
         %>
         <option> <%=rset.getString(1)%>     </option>
         <%}%>
    Usman

    Depending on the kind of user, you can change the SQL request:
    String SQL;
    if ( isAdmin ) {
       SQL = "SELECT USERNAME FROM QMSUSERS";
    } else {
       SQL = "SELECT USERNAME FROM QMSUSERS WHERE ISADMIN = FALSE";
    ResultSet rset = `execute SQL';
    etc.

  • How to capture selected value from drop down by index

    Dear friends,
    i want to capture the value of select value from drop down by index, for eg if  select air france, how to capture , could any one please let me know
    Thanks
    Vijaya

    Hi Vijaya,
    You can get the value of selected from drop down as below
    Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
    Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
                   data lo_element type ref to if_wd_context_element.
                   lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
    Now, you can get the static attribute value of selected  drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
                   data ls_data type wd_this->element_nd_drp_down.
                             lo_element->get_static_attributes(
                                       importing
                                       static_attributes = ls_data ).
    Hope this helps you.
    Regards,
    Rama

  • Gallery with Paypal buttons and drop-downs on the index page?

    I'm looking for a LR gallery where I can have thumbnails with Paypal buttons and drop-downs on the index page.
    I would prefer to keep my galleries interface streamlined and don't want to clutter it up with dropdowns and cart. I would like to have 1 page for ordering that has all my images as thumbnails with drop downs for price and size, rather than right-clicking on and image which opens in another page like the LRG Gallery with Paypal.
    I don't have a lot of experience messing with code, and none with .js. I did make a drop down in Paypal and have the code, but I think things would be pretty unwield it I designed a page as a table like I would in MS Word.
    I'm familiar with LRG Complete gallery, but don't see that it has the ability to not require a right click to order.
    I don't have a lot of experience messing with code, and none with .js. I did make a drop down in Paypal and have the code, but I think things would be pretty unwield it I designed a page as a table like I would in MS Word.
    Any thoughts, ideas, or help?
    Thanks,
    Reid

    Maybe some could try this out, and has experienced the same problem.
    It is on the site http://www.fonetix.biz
    and then push the German flag in the top Right corner, and further click on the Button "Contact info". It will give the eroor.

  • Trying to change my phone number. screen says to choose area code from drop down menu but it is blank and won't let me go further

    I am trying to change my phone number. Screen says to choose area code & prefix from drop down menu.  Drop down is blank.  Will not let me go further

        Hello llamamama9,
    Yikes! I'm sorry to learn you are having issues with changing your mobile number. I understand how important this options is. I'm dedicated to making sure this is completed once and for all. I know some time has passed since your original post, have you changed your mobile number? If not, please visit http://vz.to/V668o0 If you are still having issues after following this guide, please feel free to reach out to us, thanks!
    MatthewS_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • Multiple selection from drop down : NWDS7.0 SPS18

    Hi Team,
    How can achieve multiple selection from drop down? I am working on NWDS7.0 SPS18. I have known the concept of item list box... is that's the only option?.
    Is it possible to make it as filter option that we have in our Microsoft excel.
    Customer wants select either/all options @once from drop down.
    TIA,
    Vanita K

    Hi,
    Create a node with cardinality 0-n and selection property set to 0-n
    Create a table UI element and bind this node as a datasource to this table.
    Set the selection mode  property of this table as auto or multi
    Once this is done, populate the node with some data elements.
    When you run the application, you will be able to select multiple rows from the table.
    To get the selected rows, use below code on the action of some button
         wdComponentAPI.getMessageManager().reportSuccess("Selected rows are");
         int n = wdContext.nodeEmployeeData().size();//size of node binded with table
         int leadSelected = wdContext.nodeEmployeeData().getLeadSelection();
         for (int i = n - 1; i >= 0; --i)
              if (wdContext.nodeEmployeeData().isMultiSelected(i) || leadSelected == i )
                   IEmployeeDataElement employeeDataElement = wdContext.nodeEmployeeData().getEmployeeDataElementAt(i);
                   wdComponentAPI.getMessageManager().reportSuccess("ID: "+employeeDataElement.getID()+"Name: "+employeeDataElement.getName());
    For adding sorting and filtering functionality to the table follow the article
    [WDJ - A Generic Java Class for Filtering Web Dynpro Tables|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5996f]
    Regards,
    Amol

  • Mobile Me Alias not showing up in "From" drop down list in Mac Mail

    I have a couple of older .mac/Mobile Me email aliases that used to show up as either [email protected] or [email protected] in Mac Mail in the From drop down list, as recently as yesterday. Today, all I can see for any alias that has both the .mac and @me options due to their age, is the @mac.com version. I want to use the @me version of the alias, but this option no longer shows in the list. Newer Mobile Me aliases only have the @me.com address and they show up fine. One last point. If I use the Mobile Me web mail app, I can see both the @mac.com and the @me.com choices in the From drop down list, so it's working as it should.
    Mail isn't working correctly, but since I've not updated the Mail app recently, I suspect Mobile Me isn't sending both versions of the aliases over when the list is refreshed.
    Any suggestions? Thanks!

    It started about a week ago. The "From" drop-dow is now missing in Mac Mail. It should appear beneath the subject line. I was working with MobileMe Chat support for about 3 hours. They cannot solve the problem and have now escalated it to the "Senior Advisor Team."

  • Hide Unsorted Bookmarks from Drop-down Menu

    Hello,
    Just want to know how to "Hide Unsorted Bookmarks from Drop-down Menu" ...
    thank you.

    Best would be to move all bookmarks in the Unsorted Bookmarks folder to a folder in the Bookmark Menu folder or the Bookmarks Toolbar.
    That would only leave you with the menu entry.
    Clicking the star in the location bar will bookmark the page in the "Unsorted Bookmarks" folder and the star turns yellow (blue on Mac) to show that.<br />
    Click the highlighted star a second time to open the "Edit This Bookmark" pop-up and move the bookmark to another folder or edit the name.

  • Hide id from drop-down list at the top of the detail tab

    Hello Nakisa experts!
    I have one more question about Nakisa OrgChart 4.0 SP 1.
    How can I hide position and org unti id from drop-down list at the top of detail tab, see picture below:
    Thanks in advance.

    I'm not sure you're going to be able to change this.  I think (but I'm afraid I don't know for sure) the section is defined by \WEB-INF\uitemaplates\com\nakisa\manager\omg\ui\subucs\sectionDesigners\DetailHistoryButtonSectionSubUC.xhtml, which after a quick search through the application looks as though it might be populated by a NakisaTrollBin.jar ... which isn't really something you should be looking to edit.
    Nakisa do often write in various settings that can allow features to be tweaked and enabled/disabled.  It could be that there's something you could add into SettingsResources to apply the change you require, but you would need to contact Nakisa about this as they don't document all of these options.
    All this being said I would query why this is being done.  It is not uncommon to say have multiple positions with the same name - e.g. HR Administrator might exist in several org units.  If you are looking through several identically named org units or positions, the unique identifier is going to be the object's ID.  As such it seems most logical to me to keep the ID in the history to allow a user to discern the difference between identically named positions/org units.
    Regards,
    Stephen.

  • Inactive field "Project Versions' - from drop down

    Hi Friends
    I have created two versions of project through Tcode CN41. When I am looking for comparision, the field Project Versions from drop down is Inactive ie Edit >Comparisations > Project Versions.  I am sure that I am missing somethig but unable to detect the same to activate Project Versions.
    Would appreciate any one can help me to find out how to get activation of Project Version from drop down.Reward points can be awarded for suitable solution.
    Thanks in advance.
    Regards
    Sudhakar

    Hi Sudhakar,
    I guess you are referring to project versions, not CO versions...
    In this case, please make sure you select at least one version and the current data in the selection screen or more than one versions in the selection screen.
    You need to select the versions in the selection screen in order to compare them.
    If you cannot find the relevant fields to enter the selected version in the selection
    screen, please call the database profile and tick the flag on "version data".
    Hope this helps!!!
    Rgds
    Martina

  • I use pc windows 7 i downloaded new version fire fox i cant print wirelessly to my hp printer it is set as default when i chouse it from drop down it wont let me and it stays on the konica

    i use PC windows 7 i downloaded new version fire fox i cant print wireless to my hp printer it is set as default when i chose it from drop down it wont let me and it stays on the konica after down load new fire fox and chose disable option not compatible

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address

    How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address

    Hello,
    Try Mail>Preferences>Accounts icon>Account Information tab>Click on the Outgoing SMTP server drop down, choose edit Server list, highlight the old one & click Remove.
    (Such convolution is worthy of Windows® in my estimation)

  • I am trying to burn a cd from my playlist but after inserting my disc I do not get (burn playlist to disc) from drop down menu

    I am trying to burn a cd from my playlist but after inserting my disc I do not get( burn playlist to disc) from drop down menu?

    Hollie,
    Do things in the following order:
    Make the playlist you are going to burn, and open it.
    Have the blank CD-R handy.
    Use the command File > Burn Playlist to Disc.
    When it asks you to insert a blank disc, do so.

Maybe you are looking for

  • Can I send an e-mail to a fax number(to hong kong).If so,how?

    'Have been trying to e-mail a retail shop in hk who liste-mail address as [email protected],but keep receiving failure notices. shop name: kwailin shop''fax no. (852) 2813-8391

  • How to get coordinates of FileSystemTree selected item ?

    Hi can some one clue me in how to get the coordinates of the selected itwn in a FileSystemsTree ? thx -g

  • Function module to get user AND usergroup

    Hi Folks, I need a function module which returns the user and the usergroup. BAPI_USER_GETLIST won't work as it doesn't return the usergroup. There are some other function modules but none of them can be called remotely. I can't write a function modu

  • Srw.run_report problem

    Hi all, i'm trying to run a report inside another report using srw.run_report routine, but i get the following error: REP-0110: Impossible to open file 'app/OA11i/NOCE/software.ds/noceappl/xxene/11.5.0/reports/I/XXENE_PROPACCPDRNOINT.rdf' the full co

  • Boot up intermittent on PowerMac G5 Dual-Core

    I have an older G5 PowerMac Dual 2.0 10.4x and just recently it will not start up. I get an apple on screen and no spinning loading icon below it then the fans start to ramp up. I end up having to do a power down with the power button. Other times th