I need to calculate based on a value chosen in a drop down list!!

Ok, here's the deal.
I'm writing an order form for custom guitars.
There will be a dropdown list for many things.
Example:
Body Shape : (Shape A, Shape B, Shape C)  <-(dropdown list)
Body Color : (Color A, Color B, Color C)  <-(dropdown list)
all three shapes and colors have different costs.
So for example, if the base cost is $450
and chosing
Shape A = +$0
Shape B = +$50
Shape C = +$65
Color A = +$0
Color B = +$15
Color C = +$35
So after the customer chooses the shape and Color, I want the final price to display in the "Price" box.
So if I chose Shape B & Color C in my dropdown list, the price would read $535.
Is this possible?
If so, do I need to write a seperate calcuation for it?? How do I do it?

If all of your items in a given drop down box have a unique price you can set the export value for each option.
The custom calculation for the total price field could be, with the field names of "Body Shape" and "Body Color":
var nBase = 450;
var nShape = Number(this.getField("Body Shape").value);
var nColor = Number(this.getField("Body Color").value);
event.value = nBase + nShape + nColor;
If you created a hidden field for the base price you could use the "Field is the sum of the following fields:" and select the field names.
You could also use the Simplified Field Calculation:
450 + Body\ Shape + Body\ Color

Similar Messages

  • How can I add a blank value in a standard drop down list

    Hello,
    I have a requirement to add a blank value into the standard drop down list of for i.e. the search criteria
    "created on" -> (values are: yesterday/today/last week etc).
    The problem is, that this field has always the default value "yesterday" but our customer wants to have a blank field as default.
    Can anybody provide me steps how can I add this blank value ?
    Many thanks in advance

    Hi Bernard,
    thanks for your reply.
    Its for quotation.
    Could you give me still some further detail steps, please ?
    Many thanks
    Andreas

  • How to get the selected value/key of a drop down list box in webdynpro Java

    Dear SDN Members,
    I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
    Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
    Can any one put here the code part relating to this.
    Your help will be awarded.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi Sireesha,
        You want to display value based on the key selected in dropdown list. If you want to do like that
    1) Create a context attribute for ex: key_value
    2)In the properties of the attribute select the calculated as true.
    3)It will create getter and setter methods for your attribute.
    4)Go to implementation add the following code in getter method of your attribute
    String attributeName = IPrivateCreate.IContextElement.KEY;
    //KEY is your dropdown key attribute not the value attribute.
    IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
    ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
    Object key = element.getAttributeAsText(attributeName);
    return valueset.getText(key);
    Regards
    Suresh

  • 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 = "";

  • Cond display of drop down based on value selected in another drop down form

    Hi,
    I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
    Currently I have 2 drop downs.
    First drop down is a list of Jacks from 2000 to 4999...
    Second Drop down consists Chassis ranging from 1 to 900..
    So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
    when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
    and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
    Can someone please provide me pointers on how to do this..
    Thanks,
    Nehal

    Hi Larry,
    Thanks for your response..
    Here are the queries for my select lists.
    P62_JACK
    select list query for Jacks:
    select JACK_NUM display_value, JACK_NUM return_value
    from CTS_LIST_OF_JACKS
    order by 1
    P62_CHASSIS_BLADE_PORT
    select NETWORKPORT display_value, NETWORKPORT return_value
    from CTS_LIST_OF_NETWORKPORTS
    order by NETWORKPORT_ID
    jacks range from 2000 to 4000
    chassis_blade_port ranges from 100 to 900...
    Can you please let me know how to do it..
    Thanks,
    Nehal

  • How to set a default value for a drop down list box and then apply cascading based on the default value in Infopath 2010.

    Hello Everyone
    I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
    where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
    Thanks
    Ramanjulu Naidu N

    Hey Ramanjulu,
    Take a look at the below article which I believe will answer your question.
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Daniel Christian (MCTS)

  • Change values of drop down list when other drop-down list value is clicked

    Hi Gurus,
    I look for my requirement very much but I can't find. I think it must be very simple but I can't do it, please help :
    I have to custom added fields. Both of them is made drop-down list by picklist defined in GET_P...methods.
    When I click and select a value from the first drop-down list, I want that second drop-down values are fully changed, depend on what I select in the first list. If I select my value and press enter in the first drop down box, I can do my requirement with GET_V...method. But if I don't press enter, the values of second list doesn't change, they remain same. I want exactly that when I click and select a value from first drop-down list, second drop-down list values are automatically change, dependent on what selected. Do I have to define and event?? where and how, please help me..

    Hi,
    You must have created the field as a dropdown using the below code in the get_p method.
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
            rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
      ENDCASE.
    Here you need to add the below lines of code along with the previous code. for the first dropdown value
      IF iv_property =  if_bsp_wd_model_setter_getter=>fp_server_event.
        rv_value = 'DDLB_CLICK'.
      ENDIF.
    This would refresh the screen when the user selects any value from the dropdown.
    Regards,
    Radhika

  • Double drop down list on managing second list based on selection of first l

    hello experts,
    I call the values into the two drop down list box through the database and now
    I want to manag second drop down list box based on the selection of first drop down list box.
    So how can I do it?
    Any suggestions, jsp code and ideas will be greatly appreciated.
    Thanks and regards!

    Hello, Isn't this the same issue as:
    [http://forums.sun.com/thread.jspa?threadID=5370613&tstart=0]
    and [http://forums.sun.com/thread.jspa?threadID=5370149&tstart=0]

  • Populate updatable drop down list based on files in the folder path

    Hi, 
    I am a beginner in labview. I am stuggling on where to start.
    Here's what I need to do. 
    I want to create an updatable drop down list. It can be automatic upon opening the program or manually update by clicking an update button. The drop down list will list all the filenames that are in .cvs format. These files are stored in a folder path.  Insider the folder, they are stored in different subfolders, the drop box should be able to find those files inside the subfolders. Once the user select a filename from the list, the program will read the data inside that file and import into an array so I can display the data. 
    I have an idea on how to display the data, but I don't how to populate the drop down list based on the files in the folder, make it updatable and then import that user selected file's data into the the array. 
    Can anyone help me with this? 
    Thanks, Ruth

    Yup, ListFolder with a pattern of *.csv.  Then use a property node on a combo box or ring to set the items in the drop down.  Here is some free training if you are interested in learning more general LabVIEW tools.
    NI Learning Center
    NI Getting Started
    -Hardware Basics
    -LabVEW Basics
    -DAQ Application Tutorials
    3 Hour LabVIEW Introduction
    6 Hour LabVIEW Introduction
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Get/Set values from a drop down list

    I am trying to modify the http://www.netbeans.org/kb/60/web/web-jpa-part2.html so that instead of entering the data from a text field (in update & add) the values come from a drop down list from a table. I have drop down lists that are populated bothe from the DB and hard coding. When I run, I am able to see the options on the DDs. But none of the CRUD work. I think this is because my set and get for the drop down is wrong. Then again, I also have a few text fields from the original example which also don't seem to work. Here is a piece of my addButton():
            RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
            PaymentDetails[] pv = getSessionBean1().getPaymentVoucher();
            int rowId = Integer.parseInt(selectedRowKeys[0].getRowId());
            PaymentDetails upPV = pv[rowId];
            bankCodeDD.getSelected();
            statusDD.getSelected(); // hard coded value
          upPV.setPrepBy((String) prepByField.getText());
          PaymentDetailsController pvController = new PaymentDetailsController();
            pvController.addPaymentDetails(upPV);
            addRequest = false;
            return null;How do I set and get the values from the drop down so than it passed to my bean? When I choose a row to be updated, make changes and click Update, I get this message on my Tomcat:
    com.sun.webui.jsf.component.DropDown::The current value of component form1:deptCodeDD does not match any of the selections.
    Did you forget to reset the value after changing the options?Can someone please point me to a place which shows how I can add a default value from my DD? I tried to follow http://www.netbeans.org/kb/55/dropdowncomp.html, but unable to complete because I get an error for Options api. The auto-fix imported import org.apache.jasper.Options; But the package given in the tutorial is com.sun.webui.jsf.model.Option. My Java version is 1.6.0_07.
    private Options listOptions[];
    ...//getter setter goes here
    listOptions = new Option[noofDBRows + 1];Many Thanks!

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

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

  • Help needed in Drop down list value input

    Hi experts,
    My problem is, I added a field on a screen as a drop down list box and passed all the values to it. Everything is fine. But I need to display the field like if there are no input values to be used by the user, the user should be able to enter some value manually which is not in the list. I'm unable to get this facility. Plzz Help me out.
    It's really urgent. Points will be rewarded to the solution.

    hi ,
    Here is a sample of code for creating a dropdown list in screen painter , and this has got the solution of your question :
    module create_drop_down_box_material output.
      select matnr from mara
               into table l_tab_mara_matnr
               where matkl = 'ZPMBMAT'.
      if not l_tab_mara_matnr[] is initial.
        select maktx from makt
                     into  l_tab_collect_maktx_frm_db-material_descr
                     for all entries in l_tab_mara_matnr
                     where matnr = l_tab_mara_matnr-material_no.
          append l_tab_collect_maktx_frm_db.
        endselect.
      endif.
      loop at l_tab_collect_maktx_frm_db into l_wa_collect_maktx_frm_db.
        l_wa_mat_descr-key = l_wa_collect_maktx_frm_db-material_descr.
        append l_wa_mat_descr to l_tab_mat_descr.
      endloop.
      name = 'ZCOT_PPT_DTLS-MATERIAL_DESCR'.
      call function 'VRM_SET_VALUES'
        exporting
          id              = name
          values          = l_tab_mat_descr
        exceptions
          id_illegal_name = 1
          others          = 2.
      free: l_tab_mat_descr,l_tab_collect_maktx_frm_db.
    endmodule.                 " create_drop_down_box_material  OUTPUT
    Regards,
    Ranjita

  • Need help using drop down list to calculate fields

    I am trying to use a drop down list to control how my field calculate. I have events packages that have multiple tiers. For example, Package One has (2) Tiers. Tier 1 costs $16 & Tier 2 costs $20. So based on the number of guests i want to be able to select the tier and it multiply and give me the total cost for the package. Ex: 2 Guests for Tier 1 = $32. Here is the code i have so far, it is placed under the change handler of the drop down list:
    var costPerGuest = 16;
    var tier = event.newText;
    if (tier == "Tier 1"){
      costPerGuest = 16;}
    else if (tier == "Tier 2"){
      costPerGuest = 20;}
    Total.rawValue = String(Guests.rawValue * costPerGuest)
    //Total.rawValue = DropDownList1.rawValue;
    What happens is when I run this it will not change unless the number of guests will change. So for the example above, if i switch it to Tier 2 after selecting Tier 1, it will not change my Total from $32 to $40.
    Any help would be greatly appreciated.

    Hi,
    I think ,you can use the event of EXIT event of dropdown list.
    var costPerGuest = 0;
    if (this.rawValue == "Tier1")
      costPerGuest = 16;
    else if (this.rawValue == "Tier2")
      costPerGuest = 20;
    else
    total.rawValue = Guests.rawValue * costPerGuest;
    Hope this helps,
    S,Candy.

  • The drop down list values want to vary based on the contents of another drop down field

    hi,
    hi in search page i have two drop down list. i have two tables and one mapping tables. service line and subservice line are tables and i have one mapping table. using rapid application i create one component using mapping table. now in search page i have two drop list. one is servline and another is sub serviceline. in service line i have values like 1,2 k  for subservice 3,4.5,6 for one service line ex. for 1 i have two subservice 3,4 and for 2 i have 5,6. now my requirment in if i choose service line 1 in first drop down list, automatically in second drop down list want to contain values 3, 4. before both the drop down list have values.if i chose one value the correponding mapping value want to come in drop down list in same context node.

    Hi,
    This requirement involves defining p-getter for the service type, and the v-getter of you sub type.
    Since this involves to populate the values of subtype attribute depending on value of service type, u need a round trip.
    This is done in the p-getter of the 1st attribute(service type in your case).
    In the v-getter of the 2nd attribute, 1st fetch the current value of attribute 1, then filter the value in the dropdown table according to ur logic.
    Ref :Drop down values in table view
    Regrads
    Anish

  • Value need to select from the drop down list & should be save under Variant

    Hi,
    My requirement is that i need to display two values in drop down list of a selection screen. Between two values , one value will be display as a default value. During program execution user can choose any value from drop down list as per requirement and
    he can save this in a Variant.
    Next time if he choose data from Variant, but still he will be able to select any value from drop down list.
    For that i am using FM VRM_SET_VALUES. How can i make the changes to meet my requirement using this function module or any other suggestions will be highly appreciated.
    Thanks & Regards,
    Tutun
    Edited by: tutun nandy on Nov 19, 2010 12:21 PM

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    *https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Pictures from ALV output

    Hi, I have to create an ALV report. In output i ll have material number and few other fields and when user clicks on that material number an JPEG image has to be displayed in a seperate screen. How to achieve this functionality. where and how can i s

  • IMac G5 Intermittent power shutdowns?

    System has powered off several times over the last few months for no reason? Last night it powered off and when I powered it back on the "FAN" was running at a very high speed and was loud. I reset the SMU and that solved the fan issue for now but I

  • Iphoto can't import .CR2 shot with manual lenses on intel imac

    I'm shooting with a Peleng 8mm on my Canon REBEL Xt, it is a manual lens and my problem is that all the pictures shot with regular EF lenses can be imported in iPhoto, but the ones shot with the Peleng freeze the import process. I got this problem on

  • No sound in MBP Pro 2001 under 10.8.4

    Suddenly, no sound from jack or HP. I had sound and then I hadn't. This is NOT the red light problem, related to toslink. I tried to toggle in Audio Mini, no way.

  • Add customer field in IH08 selection-screen

    Hi guys, I need to add 1 customer field ZZ to the selection screen IH08 in order to search equipments by the ZZ field. Did anybody know if it is possible? Thanks in advance, LMS