Sum of Checkbox plus numeric field

I have a form in which  there are up charges for larger sized garments xxLarge vs Large. I am  unsure of the script to use for this.
I can generate a price from  a pull down menu for the base size and send the price to a numeric  field.
if
(xfa.event.newText=="Letter Sweater w/Stripes")
{(jacketprice.rawValue=
"129.90")}
I then repeat this for each  style in the pull down,  I also have check boxes named "size" and each  has a On Value coresponding to its size. so one checkbox's  On Value is  "small" the next checkbox is "medium" and so on. I need to have the  xxlarge and xxxLarge buttons send a value to the jacket price numeric field. The small -  large check boxes will continue to send no price increase. I also dont  want multiple buttons activated at the same time.

1st thing is that checkboxes by default are not mutually exclusive meaning that you woudl have to write code to ensure that the user only picked one. However you can create radio buttons and make them look like checkboxes. Radiobuttons by default are mutually exclusive. Then on the RadioButton group change event you can have the price adjusted accordingly.
Hope that helps
Paul

Similar Messages

  • Dynamically summing up the numeric fields in ALV output

    Dear all,
    I had report which contains of the stock overview for a particular date based on materials. I am having the fields as
    Plant Storage location Quantity
    HC01 H14f   12       
    Hc01 H1w   13       
    Whenever the layout is selected as
    Plant and Quantity  . i have to get the output as
    HC01 25  
    But if the option is based on storeage location
    H14F  12
    H1W  13
    One thing the layout will be selected in the output of alv only the user will not run the report again.
    Is there any option to this

    Hi Shreehari,
    As per i understand your question u want  sum based on a particular field.
    For that you first select the numeric filed for which you want sum and click on sum tab on screen .
    After that select the field based on which you want subtotal.
    Now beside Total tab there will be sub-total , just click on that and you will get the ouput in your desired form.
    Hope it will help you.
    Regards,
    Ashish T.

  • How to add values of checkboxs to a numeric field?

    I have 5 checkbox which I assigned values to: Excellent 5 , Satisfactory 4, Needs Improvement 3 , and so on. When I check a check box , lets say the Excellent one, I want it to put the value 5 in another numeric field. How do I do this?

    Hi,
    For the checkboxes you can set the On value and the Off value. See the Object > Binding palette. You would just set the Excellent check box to an On value of 5. Then it is just a matter of adding the checkboxes together.
    See a few examples here: http://assure.ly/omsURE, http://assure.ly/uiKS6f and http://assure.ly/iitzNJ.
    Niall

  • Is it possible to use the status of a checkbox to change the fillcolor of a numeric field?

    I have read through most all of the threads, but found none pertaining to my specific question.  I would like to change the fillcolor of a numeric field based upon the status (on/off) of a checkbox located on a different page.  In other words, if the checkbox is checked I want the numeric field to be yellow with a solid (thin) black border.  I have tried:
    If (CheckBox1.rawValue="1")
    {this.fillcolor="R,G,B";} else
    {this.fillcolor="250,250,250"};
    I haven't gotten the correct RGB values yet for the color I am using, that is why the script has "R,G,B"
    I am pretty new at javascript and have been learning a lot from the forums, but I just can't seem to figure this one out.  Any help would be greatly appreciated.  Thanks

    Give this a go...
    // form1.page1.cb::click - (JavaScript, client)
    if (this.rawValue == 1) {
      xfa.resolveNode("form1.page1.nf.ui.#numericEdit.border.fill.color").value = "255,255,0";
      form1.page1.nf.border.edge.color.value = "0,0,0";
    else {
      xfa.resolveNode("form1.page1.nf.ui.#numericEdit.border.fill.color").value = "255,255,255";
      form1.page1.nf.border.edge.color.value = "255,255,255";
    Don't forget to make your form a dynamic form.
    Steve

  • Sum of numeric field

    Hi All
    Is there a server behavior to calculate the sum in a numeric
    field? I know how to do the total records, but can't find one to do
    summation in Dreamweaver 8.
    Please help.
    JA

    SQL will do a sum, e.g.,
    SELECT SUM(quantity) AS total_orders
    Use something like that to create a recordset which contains
    a single value
    (total_orders=200) or something.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "jka_za" <[email protected]> wrote in
    message
    news:eeot05$da7$[email protected]..
    > Hi All
    > Is there a server behavior to calculate the sum in a
    numeric field? I know
    > how to do the total records, but can't find one to do
    summation in
    > Dreamweaver 8.
    > Please help.
    >
    > JA

  • Discounting total amount due numeric field

    I am working on a registration form and need to apply a discount if two particular checkboxes are selected. 
    Checkbox #1 – Early registration = $1595
    Checkbox #2 – Standard registration = $1795
    Checkbox #3 – Special rate = $495
    Checkbox #4 – Optional workshop = $395
    Numeric Field – Total Payment Due
    If the user selects checkbox #1 (early) or #2 (standard), they have to pay the $395 for the optional workshop.
         Total box =
         sum (EarlyReg, StandardReg, SpecReg, WorkshopReg) <-- THIS WORKS
    If the user selects BOTH checkbox #3 (special registration rate) AND checkbox #4 (optional workshop), they do not pay for the workshop.
    So instead of $890, they will pay $495.
         Total box =
    I welcome any ideas you may have and would love to hear if you think I'm going at this in the wrong direction.
    I am new to this...would appreciate a step-by-step with syntax. Thanks!

    TundraSteve, Thanks for the reply.
    Your suggestion got me on the right path. Here's what worked using FormCalc on the TotalDue field:
    if (SpecReg + WorkshopReg == 890) then
      SpecReg
    else
      sum (EarlyReg, StandardReg, SpecReg, WorkshopReg)
    endif
    Thanks again!

  • Aggregate a numeric field in an internal table

    Hi All,
    I have a small requirement in ABAP…it goes in this fashion
    I need to aggregate a numeric field in an internal table, the table is as follows   
    FLD1        FLD2         NUM1       FLD3
    123A        B1             10            C1
    123A        B1             25            C1
    123B        B1             20            C2
    123C        B2            10             C3
    Note: FLD1, FLD2, FLD3 are of type numeric characters and NUM1 is of type number or integer
    I want the result to be as follows
    FLD1        FLD2        NUM1        FLD3
    123A        B1            35             C1
    123B        B1            20             C2
    123C        B2            10             C3
    i.e. values in field NUM1 should get add up when the values in all other fields are same…
    I am not able to use ‘_collect_’ for this as the fields contain numeric characters.
    Regards and Thanks,
    Antony

    Hi Antony
    collect here works like this:-
    use at new field
          sum
    end at.
    Pls reward points if it wil be helpful.
    Regards
    Depanker

  • Change the style of a numeric field when his value is 0

    I need show a numeric field in some reports with color red and italic font, but only when the value of number is low than zero. In another case the text must be normal. Is really possible do that? That applies to section details or final summaries.
    Many thanks for the help.

    Hi
    To make your number filed in Red :
    Right click on the field and go in format field click on Font tab and go in Color formula editor and give the following formula :
    If Sum(fieldValue} < 0 Then CrRed else CrNoColor
    Now go in Style formula editor and give the following :
    if sum() < 0 then Critalic
    This will make your field red and italic when it is less than 0
    Thanks,
    Sastry

  • Calculating on Numeric Fields

    It was very easy to add a calculation field in previous versions of Adobe. This one has got me. I'm trying to create a field that sums other fields. I don't know where to add the script or the language. Any assistance would be greatly appreciated.

    Add the script in the calculate field of the field that you want to display the calculation, ie something like
    this.rawValue = form1.blaa.rawValue + form1.foo.rawValue
    (where blaa and foo are the fields that you want to sum)
    make sure all the fields are decimal fields or numerical fields if you want to sum them.
    (oh, and you can set the text field to be Calculated in Object, Value, Type, but this is not essential)

  • Black + In Numerical Fields

    Alright....so I have a little hiccup with numerical fields. I have a field set up in a subform and set to expand to fit the inputted values. When I type a value in though and the box expands, a black small box with a "+" in it appears covering up part of the number. Any idea why this happens? The subform is set to flow, everything else works fine, and the box appears to expand to the right size minus this box. Any assistance, as always, would be greatly appreciated. Thank you in advance!

    Hi,
    The plus (white on black) indicates that the contents have overflowed the field. If this is not he case because you have set the field to expand and it is doing this OK, then Acrobat may just "think" that the contents are overflowing.
    I can't replicate your issue. Someone may be able to help you if you post the form to the forum.
    N.

  • How Do You Change A Numeric Field To Blank When Zero?

    I'm using Adobe Acrobat 6.0 Professional, version 6.0.6.
    Can anyone help me with the code to change a numeric field to blank, when "0.00"?

    "no success" does not provide much to go on.
    With your scripts, I get the concatenation of the sting values, so one has to force JavaScript to convert strings to numbers.
    Make sure your field names are exact including case.
    Make sure the calculation order is correct.
    The following scripts all work:
    var fa = 1 * this.getField("FeeN01").value;
    var fb = 1 * this.getField("FeeN02").value;
    var fc = 1 * this.getField("FeeN03").value;
    event.value = fa + fb + fc;
    if ((event.value == 0)) {
    event.value = ""
    // or
    var fa = this.getField("FeeN01").value / 1;
    var fb = this.getField("FeeN02").value / 1;
    var fc = this.getField("FeeN03").value / 1;
    event.value = fa + fb + fc;
    if ((event.value == 0)) {
    event.value = ""
    // or
    var fa = Number(this.getField("FeeN01").value);
    var fb = Number(this.getField("FeeN02").value);
    var fc = Number(this.getField("FeeN03").value);
    event.value = fa + fb + fc;
    if ((event.value == 0)) {
    event.value = ""
    The "sum of" also works with the "Custom validation script" of:
    if (event.value == 0) event.value = "";

  • Numeric Field Display

    I think I've run into a bug with Designer. Can anyone confirm this? Or have I overlooked something?
    Situation:
    I have 5 numeric fields* in my form that use simple FormCalc calculations. All of them have the Object Field Display Pattern set as $z,zz9.99.
    All calculations work perfectly. However, when I was testing the form I discovered something quite odd. The display is perfect until the dollar amount exceeds $9,999.99. Once over this amount the format disappears leaving just the correct result (e.g. What should be $12,345.67 is displaying as 1234567.). I tried editing the display pattern to $zzz,zzz,zz9.99 but this did not work.
    Is there a JavaScript that will give me the formatting and calculations I need? Or do I need switch something else on in Designer? Thanks.
    * Calculations used:
    1) sum(BlackInkCost, ColourInkCost)
    2) sum(WhitePaperCost, ColourPaperCost, CardStockCost, TabCost, TransparencyCost)
    3) sum(CerloxCost, SpiralCost)
    4) sum(ImpressionsSubTotal, PaperSubTotal, BinderySubTotal)
    5) (CostSubtotal * NoDocumentsReqd)

    This would be the expected behaviour in the case of data entered into fields which do not match the pattern. This is not a bug, since you applied a pattern to display a certain number of characters and you entered something different, the pattern will fail and the form processor will leave the display as it is.
    As for increasing the number of characters in the pattern, it should work. Make sure you dont have a conflict between the edit, display and binding patterns. If they are different, you may get unexpected results.
    Also, if you do have a small pattern and can enter large numbers, then you should really apply some script to make sure your value is within legal limits. The rawValue of the field will always give you the pre-display pattern value.

  • How to add different numeric fields

    hai,
    How to sum the different numeric fields like eno,esal and dno for a table EMP between eno= 51 to 57 of 100 records.
    Please provide the code for this.
    regards,
    bhargav.

    hi,
    first, i fully agree with Max. Wrong forum!
    second, hard to understand what you want to do, but if you want to sum up the colummns for all rows where eno between 51 & 57 try this:
    data: sum_eno type i, sum_esal type i, sum_dno type i.
    select sum( eno ) sum( esal ) sum( dno )
         from EMP into (sum_eno, sum_esal, sum_dno)
         where eno between 51 and 57.
    regards,
    anton

  • What is the initial value for a numeric field ??

    Can someone tell me what the INITIAL VALUE FOR A NUMERIC FIELD is ?? Thank you
    Rod.

    Using the following...
       class MyClass
         int myvar1;  // Default initial value
         int myvar2 = 3;  // Default initial value and default value
         MyOtherClass myclass1; // Default initial value
         void doit()
           int mylocal1;  // No value
           MyOtherClass myclass2; // No value
    All number member variables, like myvar1 start off with andefault initial value which is zero. For booleans this is false. Object reference variables, like myclass1, have a null value.
    All local numeric variables are considered undefined. So mylocal1 and myclass2 are undefined. Before you can use them you must explicitly provide a value.
    Finally note that myvar2 will have two values during class instantiation. Initially it will have a value of zero. Sometime later it will have the value of 3. (When that happens is very definitely outside the scope of what this forum covers. If you want to know then ask in the advanced forum.)

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

Maybe you are looking for

  • Create Material using MATMAS05 IDOC

    Hi Gurus, Please tell me what are the mandatory fields and tables for those fields to create a Material using MATMAS05 standard IDOC.

  • HT1351 how can i make my ipod sync faster

    Why is my ipod touch 4th generation 32GB taking so long to sink? I'm only sinking 10GB because I don't have much time and it's taking a minute to download 1 song

  • HT4847 How do I delete/add apps to iCloud?

    It says my iCloud storage is full, but it contains no info on my notes, or reminders or anything. There's no way I have 5 gb of stuff in my calender alone to fill my storage. It's gotta be my apps, but I see no place to delete them off iCloud!

  • The new forum software

    Folks, Lets take a vote. Do you just love (10) or utterly despise (-10) the new forum software? -8 Against 1. It's kitchy. 2. It's buggy. 3. Source code is HARDER to read than ever. 4. They should have adopted wiki markup. For Ummm. RTF is kinda cute

  • Signal LOOKS strong but I've got no access

    My Airport signal not only looks strong but also lists my base station perfectly when I look in the icon on the menu bar (as well as a couple of neighboring ones). When I look in Network Preferences, Airport has a green dot and it says it's connect t