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.

Similar Messages

  • I need help with drop down lists

    I have a form that does not have lots of space and I want to use drop down lists to fill in specific information that describes site conditions.  The problem I have is that the drop down list is only set up for a single line and that is not enough space for what I want in the drop down list.  In other words, I have items that are several sentences.   I have seen some descriptions of creating a drop down list that then fills in a text box that has multiple lines.  Unfortunately, that is not an ideal solution for me.  I just want the drop down list to select a single phrase.  Here is an example of what I want to be able to select in the drop down.
    The water heater spilled flue gases in excess of 5 minutes under worst case conditions.  The combusiton testing was completed with in 30 days of the invoice submittal. 
    The form does not allow me to create a field that goes all the way across the page so it needs to look something like this:
    The water heater spilled flue gases in excess of 5 minutes
    under worst case conditions.  The combusiton testing was
    completed with in 30 days of the invoice submittal.
    Any help is greatly appriciated.

    Thanks for responding.
    I have three items that are very similar in length and text for each drop down.  There are 9 drop downs right now.  I am using the drop downs to fill in a form that is used by several people and I want to keep things as simple as possible.  Associated with the drop down already is a check box.  When the check box is checked, it fills in a text box with a score (1 point, 5 points, etc).  That score then tallys for a total with all the other scores in another text box.  Using a drop box to fill in a text box is just getting to busy and than I have to distinguish each drop down item so it is clear which text you are selecting.

  • Need help with drop down list in parameters

    Hi All,
    I have the following data set:
    DEPT1     DEPT2     DEPT3 DEPT4
    Commissioner's Office     Finance     Accounting     Accounts Payable
    Commissioner's Office     Finance     Accounting     Fiscal Analysis & Repo
    Commissioner's Office     Finance     Accounting     
    Commissioner's Office     Planning,Asset Mgt     Asset Management     Inventory & Tracking
    Commissioner's Office     Planning,Asset Mgt     Asset Management     Mobility & Congestion
    Commissioner's Office     Planning,Asset Mgt     Asset Management     Roadway Safety
    Commissioner's Office     Planning,Asset Mgt     Asset Management     
    Commissioner's Office     DesignProj Mgt & Tec     Bridge Dsgn Insp Hyd     
    In plus i have four parameters with searchlight options, the problem is when i select "Finance" from DEPT2 and in the next selection level i'm seeing all the departments "Accounting,Asset Management and Bridge Dsgn Insp Hyd" insted of just "Accounting". What i want is if i select a department in DEPT2, in the next drop down list(DEPT3) i want to see only the departement corresponding to the one i selected in dept2. Please need help.
    Thanks

    Hi
    First of all you need to be using Discoverer 10g or 11g Plus not 9.0.4. Assuming you have the right version you need to present the parameters in the correct order. You can change the order on the parameters screen by selecting Tools | Parameters from the toolbar. You then use the Move Up and Move Down buttons to place them in the right order so that DEPT1 is offered first, followed by DEPT2, then DEPT3 and then DEPT4.
    Next, you need to check the radion button on the bottom of the right-hand side that allows linking of parameters then you make DEPT2 dependent upon DEPT1, with DEPT3 dependent upon DEPT2 and so on.
    While this works without hierarchies it works best when you have a hierarchy in place and even better when there is a composite index on the 4 items.
    Best wishes
    Michael

  • Need help on drop down list

    Iam trying to create the drop down list. Well, I got some programs, creating these lists for both parameter and ranges on the selection screen.
    What the user wants is when the selection screen is loaded, he wants to select from the list OR ENTER ANY DATA WHICH IS NOT THERE IN THE LIST. To be able enter any data other than what is there in the list is not working for me.
    itz urgent plz

    Hi
    Do you want values in a list box
    try with the fun module VRM_SET_VALUES
    see the sample code
    Input : p_char = 'J'.
    Press: enter
    List Box of Month = January, June , July.
    REPORT ZLIST_VALUES.
    TYPE-POOLS vrm.
    tables:
    spfli.
    parameters: p_char type c.
    parameters:
    p_month(12) as listbox visible length 20,
    p_year as listbox visible length 20 .
    DATA:
    t_table TYPE STANDARD TABLE OF vrm_value,
    t_table1 TYPE STANDARD TABLE OF vrm_value,
    vrm_values1 LIKE LINE OF t_table.
    DATA:
    t_year TYPE STANDARD TABLE OF vrm_value.
    data: w_year(4) type n value '2000'.
    at selection-screen output.
    vrm_values1-key = 'a'.
    vrm_values1-text = 'January'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'p'.
    vrm_values1-text = 'February'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'q'.
    vrm_values1-text = 'March'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'r'.
    vrm_values1-text = 'April'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 's'.
    vrm_values1-text = 'May'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 't'.
    vrm_values1-text = 'June'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'u'.
    vrm_values1-text = 'July'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'v'.
    vrm_values1-text = 'August'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'w'.
    vrm_values1-text = 'September'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'x'.
    vrm_values1-text = 'October'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'y'.
    vrm_values1-text = 'November'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'z'.
    vrm_values1-text = 'December'.
    APPEND vrm_values1 TO t_table.
    t_table1[] = t_table.
    delete t_table1 where text+0(1) <> p_char.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'p_month'
    values = t_table1
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2.
    do 10 times.
    add 1 to w_year.
    vrm_values1-key = sy-index.
    vrm_values1-text = w_year.
    APPEND vrm_values1 TO t_year.
    enddo.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'p_year'
    values = t_year
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2.
    start-of-selection.
    write: p_month.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Help needed to create drop down list for a field.

    Hi,
    I have to create a parameter/select-options on the selection screen having  drop down values and also having multiple selections allowed.
    Please help me to attain this functionality.Its urgent.
    Thanks,
    Sandeep.

    Hi,
    Here is the exampel Program, i am sending the code for a Paramter, If you want this for the Select-options, then you need to have the paramer name as PS_PARM-LOW and you need to write the smae logic again for PS_PARM-HIGH to get the List box for the select-option
    REPORT ZLIST.
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'PS_PARM'.
    VALUE-KEY = '1'.
    VALUE-TEXT = 'LINE 1'.
    APPEND VALUE TO LIST. VALUE-KEY = '2'.
    VALUE-TEXT = 'LINE 2'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    START-OF-SELECTION.
    WRITE: / 'PARAMETER:', PS_PARM.

  • How can i add a drop down list to a fields using BHTML( displaying on its)

    Please help me to add a drop down list to a field while displaying on ITS using BHTML or javscript. List should show all the values from value table or search help.

    Hi Sandeep,
    in ABAP, read the table (keys and values) and write it to the ITS context, e.g. with field names KEY and VALUE.
    On the ITS template, write code like this:
    `if (KEY.dim > 1);
       repeat with i from 1 to KEY.dim;
        keys1[ i ] = KEY[ i ];
        contents1[ i ] = VALUE[ i ];
        if (KEY[ i ] == SELECTED_KEY);
         selIndex = i;
        end;
       end,
       SAP_TemplatePulldownField("field1", fieldLabel=#label, name="KEY", key="keys1", content="contents1", selIndex=selIndex);
    end`
    (I had to add blanks between the brackets to get the code displayed correctly here.)
    HTH & best regards,
    Carlo

  • RE: Using Drop-Down List in Express Application

    The easiest way to do this is to define a domain for Gender that maps to
    a droplist widget. ForteExpress will then automatically display the
    widget in any ArrayWindow or FormWindow in which Gender appears. (I
    don't think outlinefields support this widget.) There is a documented
    customization for adding SQL to the domain to automatically fill it, but
    we've found this to be a performance drag. What we usually do is cache
    this type of list information on the client, usually by loading it into
    arrays of listelement in a service object at user logon. The list is
    then ready to go whenever a window needs it, and you can set the element
    list of the droplist in PostOpenInit or wherever it seems appropriate.
    From: David Wilbur[SMTP:[email protected]]
    Sent: Wednesday, February 26, 1997 2:21 PM
    To: [email protected]
    Subject: Using Drop-Down List in Express Application
    To: [email protected]
    cc:
    Subject: Using Drop-Down List in Express Application
    On an Express generated Form window I want to use a drop-down list to
    define the list of valid values for a database field. The underlying
    database field could have a datatype of either integer or character.
    For example, on the database we have a Gender column defined. I want to
    use a drop-down list that displays descriptions of "Male" and "Female" for
    allowed database values of "M" and "F". The Gender column is updateable on
    the window.
    Any suggestions on the best way to do this? Would we need to do anything
    different on Array windows?
    David Wilbur email: [email protected]
    University of Windsor phone: 519-253-4232 ext. 2779
    Windsor, Ontario Canada

    Hai Please try the following code
    You have to make some changes according to your system i am using
    MSSqlserver Driver change the class name and the connection string
    for your need
    <HTML>
    <HEAD>
    <%@ page language="java" import="java.sql.*"%>
    <LINK href="../theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>ListDrop.jsp</TITLE>
    <%!Connection con;
         %>
    </HEAD>
    <BODY>
    <select>
         <%
              try {
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");\\Here you specify the Class Nale
                   con = DriverManager
                             .getConnection(
                                       "jdbc:microsoft:sqlserver://javaserver:1433;DatabaseName=karthi",
                                       "sa", "sa");\\here Connection string
                   ResultSet rs;
                   Statement st = con.createStatement();
                   rs = st.executeQuery("select SerialNo,Food from Foods");
                   while (rs.next()) {
    %>
         <option value='<%= rs.getString("SerialNo") %>'><%= rs.getString("Food")%></option>
         <%
              } catch (Exception e) {
                   e.printStackTrace();
    %>
    </select>
    </BODY>
    </HTML>

  • Using Drop-Down List in Express Application

    To: [email protected]
    cc:
    Subject: Using Drop-Down List in Express Application
    On an Express generated Form window I want to use a drop-down list to
    define the list of valid values for a database field. The underlying
    database field could have a datatype of either integer or character.
    For example, on the database we have a Gender column defined. I want to
    use a drop-down list that displays descriptions of "Male" and "Female" for
    allowed database values of "M" and "F". The Gender column is updateable on
    the window.
    Any suggestions on the best way to do this? Would we need to do anything
    different on Array windows?
    David Wilbur email: [email protected]
    University of Windsor phone: 519-253-4232 ext. 2779
    Windsor, Ontario Canada
    -----------------------------------------------

    Hai Please try the following code
    You have to make some changes according to your system i am using
    MSSqlserver Driver change the class name and the connection string
    for your need
    <HTML>
    <HEAD>
    <%@ page language="java" import="java.sql.*"%>
    <LINK href="../theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>ListDrop.jsp</TITLE>
    <%!Connection con;
         %>
    </HEAD>
    <BODY>
    <select>
         <%
              try {
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");\\Here you specify the Class Nale
                   con = DriverManager
                             .getConnection(
                                       "jdbc:microsoft:sqlserver://javaserver:1433;DatabaseName=karthi",
                                       "sa", "sa");\\here Connection string
                   ResultSet rs;
                   Statement st = con.createStatement();
                   rs = st.executeQuery("select SerialNo,Food from Foods");
                   while (rs.next()) {
    %>
         <option value='<%= rs.getString("SerialNo") %>'><%= rs.getString("Food")%></option>
         <%
              } catch (Exception e) {
                   e.printStackTrace();
    %>
    </select>
    </BODY>
    </HTML>

  • Missing Export and Use Drop Down Lists

    I cannot export my .mov files to any format other than .mov as the Export and Use drop down lists are missing. When I go to File > Export the text for Export and Use are there followed by blank gray space as if the drop down lists never existed.
    I just upgraded to Pro today and had infrequently used QuickTime Player previously. I have the most current version 7.6.5. The other functions appear to be working normally, but I am not a "familiar user" so I can't say for sure.
    Any ideas?

    Well I could not copy & paste the text from the Movie Inspector, so I have typed it below (except for the complete source info).
    Source: C:\....Filename.MOV
    Format: 16-bit Integer (Little Endian), Mono, 44.100 KHz
    MPEG-4 Video, 1280 x 720, Millions
    Movie FPS: 30.01
    Playing FPS: 30.01
    Data Size: 8.16 MB
    Data Rate: 6.99 mbits/sec
    Current Time: 00:00:00.00
    Duration: 00:00:09.80
    Normal Size: 1280 x 720 pixels
    Current Size: 1280 x 720 pixels
    I have also downloaded a couple of iPod hip-hop ad movies (.mov) and they have the same problem (no export drop-down lists), so I don't believe it is the movie format.
    I have not tried to uninstall/reinstall QuickTime Pro yet, but wonder if I should....

  • Can I copy and paste a drop down list into another field?

    Can I copy and paste a drop down list into another field?

    You don't have to create a PDF, but it would be helpful to know what, exactly, you want to do with the ppt.
    You can export as a PDF which will keep vectors and text as PostScript (crisp) elements.
    You can also Save As from ppt in a variety of formats such as PNG or TIFF.
    These rasterize all the vectors and text, but are very useful if you're laying out a miniature gallery of the powerpoint presentation.
    However, if you want to make the InDesign file a replica of the ppt slides for print, PDF is probably the best way to go.

  • Need help with Drop Down Menu _ URGENT!!

    Hello -
    I'm new to Dreamweaver. I actually have an old version
    (Dreamweaver MX 2004).
    I'm updating a website for work and this needs to be done as
    soon as possible so I'd appreciate if anyone can be so kind as to
    shed light on ANYTHING. =/
    This is what I need:
    I need a drop down menu; when a selection is chosen, I need
    information regarding that selection to appear on the bottom of the
    page. (I am working off an Excel sheet - it has list of service
    descriptions along w/ the unit price, frequency & other fields.
    So If I chose "database hosting" off the drop down list,
    information would be generated (ie. it's corresponding unit price,
    frequencies, etc.)
    I've attached an example of a code but I cannot use that code
    (which has JavaScript) to tweak what I need exactly.
    I am VERY new to this so if anybody can help be out I would
    GREATLY appreciate it.
    Thanks!!

    >I buy all their stuff as it
    > is excellent.
    Double Ditto!
    Walt
    "Paul Gillard" <[email protected]> wrote in
    message
    news:gedcoi$d65$[email protected]..
    > Hi
    > To be honest, the very best thing you can do is to get
    hold of a DW
    > extension
    > from
    http://www.projectseven.com
    and then you will be able to have a
    > completely
    > editable 'easy to implement' drop-down menu system! I
    buy all their stuff
    > as it
    > is excellent.
    >
    > Cheers
    > Paul
    >

  • How to display information from database using drop down list in JSP?

    Hi all.
    Like the tile above suggest, I'm having difficulty in obtaining the data as well as displaying them in a drop down list.
    For example: If i were to have the following in my database:
    SerialNo Food
    1 Bread
    2 Milk
    3 Butter
    The drop down list should look like the following:
    [Bread][\/]
    [Milk]
    [Butter]
    How do i go around coding it in JSP?
    Thanks in advance.
    C.K

    Hai Please try the following code
    You have to make some changes according to your system i am using
    MSSqlserver Driver change the class name and the connection string
    for your need
    <HTML>
    <HEAD>
    <%@ page language="java" import="java.sql.*"%>
    <LINK href="../theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>ListDrop.jsp</TITLE>
    <%!Connection con;
         %>
    </HEAD>
    <BODY>
    <select>
         <%
              try {
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");\\Here you specify the Class Nale
                   con = DriverManager
                             .getConnection(
                                       "jdbc:microsoft:sqlserver://javaserver:1433;DatabaseName=karthi",
                                       "sa", "sa");\\here Connection string
                   ResultSet rs;
                   Statement st = con.createStatement();
                   rs = st.executeQuery("select SerialNo,Food from Foods");
                   while (rs.next()) {
    %>
         <option value='<%= rs.getString("SerialNo") %>'><%= rs.getString("Food")%></option>
         <%
              } catch (Exception e) {
                   e.printStackTrace();
    %>
    </select>
    </BODY>
    </HTML>

  • BUG: Sorting drop-down lists from the field tab when using "specify item values"

    Hi all,
    I've finished creating my form now, but I came across this whilst writing up my documentation for maintenance tasks.
    This occurs when adding new values to a drop-down list that has the "Specify item values" checkbox in the binding tab checked.
    When I then try to sort my list using the built in sort buttons, it will sort the items, but the list of specified values in the binding tab does not sort reorder to stay with the original items in the list.  This is hapenning when I sort from the Object > Field tab.  If I sort in the Object > Binding tab then the sort will include the specified values.
    For example:
    A    5
    C    2
    D    9
    Add a new value to get:
    A    5
    C    2
    D    9
    B    10
    Sort the list using the button:
    A    5
    B    2
    C    9
    D    10
    But it should be:
    A     5
    B     10
    C     2
    D     9

    I was able to duplicate this problem and it looks like a possible bug.  I've submitted it to support.

  • Its urgent please help me( Drop Down list box)

    Hi i am writing th eBDC for VA32 t-code in that screen it is having the dropdown box for the line items i want to select the drop down list in that screen through BDC how we can do this?
    Thanks in advance

    yes but when we are transfering that value it is not accepting
    0     Assigned by the System (Internal)
    1              Delivery date too late
    2     Poor quality
    3              Too expensive
    4     Competitor better
    5     Guarantee
    10            Unreasonable request
    11     Cust.to receive replacement
    50     Transaction is being checked
    the thing is in the drop downbox these text values are coming
    but how can i?

  • Need help with Drop down cells on IPAD Numbers

    Hy everyone:
    Im new in this forum and Im not god writing, so sorry for my english.
    I have a question about using Drop down cells on Numbers in the IPAD version. In Numbers I normally can use drop down cell but some days ago i bought the IPAD and Iwork suit, and i import some numbers documents that I have done. When I tried to drop the menu of a cell I could not.
    I would like to know is their is a way to see this type of menus on IPAD Numbers.
    Thanks for the attention. And I will be grateful for your answers

    I don't think drop down selection is supported in iPad numbers. If you would like to see this functionality added, peas make a suggestion at http://www.apple.com/feedback
    Thanks
    Jason

Maybe you are looking for