Scripting calculations

I'm new to scripting, so someone please help me out.
I have a set of questions in a form, and based on the answer of each question, i need to calculate a certain value.
Can this be done? If so, under which event do i script and how do i do it?
Can someone send me an example by putting in 2 questions in a form and calculating the score in percentage?
Prashant.

See the sample attached..

Similar Messages

  • Errow with IF statement in Scripted Calculation view

    Hi Team,
    I am trying to use IF statement in Scripted Calculation view.
    My scenario is:-
    I need to create a restricted Key figure based on input date from user.
    While i am activating my view system gives "Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: transaction rolled back by an internal error: Syntax Error for calculated Attribute: line 29 col 9 (at pos 1501)" error.
    Below is the code i have used in my CV.
    CE_CALC('IF((to_int("BUDAT") >= to_int(2013-01-01),"AMOUNT",'''')', DECIMAL(13,2)) AS "DTR"
    Here, "AMOUNT" is another calculated field created using CE_CALC.
    Without above IF statement my CV runs perfectly fine. The moment i include IF statement it does not activate.
    Kindly provide your inputs.
    Thanks & Regards,
    Anup

    Hi Lars,
    I am extremely sorry about the confusion.
    There was an extra parenthesis in the IF statement which was not allowing the CV to be activated. CV is now successfully activated.
    But my data is not getting restricted correctly.
    It is showing 0 against all the records.
    Below is the sql used for calling the CV.
    SELECT * FROM "_SYS_BIC"."A_123/CV_SCR_BSID_BSAD_ITEMS" ('PLACEHOLDER' = ('$$Currency$$', '''Local'''),'PLACEHOLDER' = ('$$Date_From$$','2014-01-01' ), 'PLACEHOLDER' = ('$$Date_To$$','2014-06-30' ));
    Below is my updated CE_CALC function :-
    CE_CALC('IF(date("BUDAT") >= date(:Date_From) and date("BUDAT") <= date(:Date_To),"AMOUNT",0)', DECIMAL(13,2)) AS "DTR"
    Is there any issue while passing values here?
    Regards,
    Anup

  • Script calculation

    Hey guys,
    I need to write a custom Java script calculation.
    Total1+total2+total3+total4+total5+total6+total7+total8+total9= Ad total....
    ....if  (clicked check box) then 20% off Ad total=?   <-----to be placed in the same field as the Ad total. Thus over writing the orignal Ad total.
    Thanks
    Joe

    Kumar,
    follow next steps:
    1. Create new logic file and name it "TEST" for example
    2. Use next coding in it:
    *XDIM_MEMBERSET P_ACCT = YOUR_P_ACCT_MEMBER
    *IS "YOUR_PROPERTY_VALUE"
    *REC(EXPRESSION=%VALUE%,TIME="2010.MAR")
    *ENDWHEN
    *COMMIT
    3. Validate and save your TEST.LGF
    4. Insert next coding into DEFAULT.LGF
    *INCLUDE ADD.LGF
    5. Validate and save DEFAULT.LGF
    Put your values insted of "YOUR_P_ACCT_MEMBER", "YOUR_PROPERTY_VALUE"
    This coding works for sure.
    U can use ABAP in script logic. The mechanism is described here:
    http://help.sap.com/saphelp_bpc70sp02/helpdata/en/a1/532226947C49A5B2E2BD32450CB2D1/frameset.htm
    Hope that was helpful,
    Dzmitry

  • Need help with Report Script calculation...

    When trying to implement a calculation on 2 members (sales, tax exempt) I am having a problem keeping the report from accumulating the calculation total...
    Any ideas would certainly be appreciated.
    Thanks,
    //*****Script******
    { CALCULATE ROW  "item1" OFF}     //sets variable for first calculation item
    { CALCULATE ROW  "item2" OFF}     //sets variable for second calculation item
    <row("entities", "Measures")
    //{Supoutput}
    {SETROWOP "item1" +}     //starts adding the member
    "Sales"
    {SETROWOP "item1" OFF}     //stops adding the member
    {SETROWOP "item2" +}          //starts adding the member
    "tax exempt"
    {SETROWOP "item2" OFF}     //stops adding the member
    //{OUTPUT}
    { CALCULATE ROW  "total sales" = "item1" - "item2"
    PRINTROW "total sales"}
    //*****what I am expecting******
    north      sales     777.00
    north      tax exempt     27.00
    north      total sales     750.00
    south      sales     796.00
    south      tax exempt     23.00
    south      total sales     773.00     <======     correct
    //******actualreport results******
    north     sales     777.00
    north      tax exempt     27.00
    north      total sales     750.00
    south     sales     796.00
    south      tax exempt     23.00
    south      total sales     1523.00     <==== accumulated number / wrong!
    Edited by: Adam M on Sep 29, 2011 5:06 PM

    You should do this calculation in Essbase, not in report script. Add dynamic calc member "Total Sales" with formula "Sales" - "Tax Exempt"...
    Regards,
    Yuri

  • Script calculation for dimension properties

    Dear Experts,
    I am using BPC 7.0NW,
    My code in Default.lgf:
    *BEGIN
    [P_ACCT].[#B] = [P_ACCT].[A]* [P_ACCT].[C]
    *END
    Now, I want to run this calculation for dimension property wise.
    LIke i want to add dimension properties in above calculations.
    And how do i put "IF" conditions?
    Please help me ...
    Thanks alot in advance.....!

    Kumar,
    follow next steps:
    1. Create new logic file and name it "TEST" for example
    2. Use next coding in it:
    *XDIM_MEMBERSET P_ACCT = YOUR_P_ACCT_MEMBER
    *IS "YOUR_PROPERTY_VALUE"
    *REC(EXPRESSION=%VALUE%,TIME="2010.MAR")
    *ENDWHEN
    *COMMIT
    3. Validate and save your TEST.LGF
    4. Insert next coding into DEFAULT.LGF
    *INCLUDE ADD.LGF
    5. Validate and save DEFAULT.LGF
    Put your values insted of "YOUR_P_ACCT_MEMBER", "YOUR_PROPERTY_VALUE"
    This coding works for sure.
    U can use ABAP in script logic. The mechanism is described here:
    http://help.sap.com/saphelp_bpc70sp02/helpdata/en/a1/532226947C49A5B2E2BD32450CB2D1/frameset.htm
    Hope that was helpful,
    Dzmitry

  • Script / Calculation to round decimals?

    Hello all,
    I'm building a form to look at the cost of replacing lightbulbs over time, based upon the average life of the lightbulb and average annual operating hours. Normally, I can find this by dividing bulb life over bulb use and multiplying that by the replacement cost, which works fine for our use if you're replacing lightbulbs at least once a year. However, we have lightbulbs that can burn continuously for 5 years, and since you can't by 20% of a lightbulb, I really cant get away with averaging the cost because it's not a true expenditure of money.
    So what I'm looking for is a script or calculation that will round "X" (the field in question) to the lowest whole number. When X = 1 that would mean the lightbulb has burned its life hours and would need to be replaced. In that case I can multiply that rounded result by the price and I should be ok.
    Basically;
    if "X" is greater than 0 or 1, it would round it to 0, even is X is actually .95.
    ANY help I can get on this would be very much appreciated! Thanks

    You can use the Math.floor method. For example:
    var x = 0.95;
    var y = Math.floor(x);
    app.alert(y);  // Shows 0
    If you need more help with creating a custom format/calculate/validate script that does this, post again an include more details about how you want the form to behave.

  • Repeatable subforms script calculation syntax

    My form contains a subform (row) with 5 radio buttons, with values (scores) of 5,4,3,2, and 1. The user may add another of these subforms by clicking a button.
    My intention is to set a field with the average score -- that is, obviously, the total scores, divided by the number of rows. Here is my FormCalc for the calculate event of the Average field -- complete with error message:
    b Script failed (language is formcalc; context is
    b xfa[0].form[0].form1[0].Pg1[0].#subform[2].EssentialAv[0])
    b script=
    b var totPts =
    b Sum(form1.Pg1.EssentialJobRow[*].RadioButtonList.#field[3])+
    b Sum(form1.Pg1.EssentialJobRow[*].RadioButtonList.#field[2])+
    b Sum(form1.Pg1.EssentialJobRow[*].RadioButtonList.#field[1])+
    b Sum(form1.Pg1.EssentialJobRow[*].RadioButtonList.#field[0])+
    b Sum(form1.Pg1.EssentialJobRow[*].RadioButtonList.#field[4])
    b var numRows =
    b Count(form1.Pg1.EssentialJobRow[*].RadioButtonList.#field[4])
    b //$.rawValue=totPts
    b //$.rawValue=numRows
    b $.rawValue = totPts/numRows
    b Error: arithmetic over/underflow.
    I have used the commented lines in debugging, to prove that the total score and the number of rows are being calculated correctly. There is always at least one instance of the subform, so numRows is always greater or equal to 1 -- never 0.
    This is such a simple thing, I know the answer must be staring me in the face, but I do not see it.
    Thanks for any suggestions you may have.

    I was mistaken. The number of rows *does* go to 0.
    To test, I displayed the total points and number of rows variables with two message boxes.
    When I click the button to add a row, the point count and the row count increment properly.
    However, when I click one of the unselected radio buttons in a row, the point total increments correctly, but the row count sometimes is 0.
    I suspect it relates to the sequence of events related to my use of the Count function to try to determine how many instances of the row exist.
    Back to the drawing board to find a more appropriate way to determine the number of subforms I have created . . .

  • Inline Calc Script Calculation

    Hello! I'm being lazy and i'd like to calculate a variable in a calc script using an inline calculation, choosing a very simple example:
    *1. VAR WEIGHT = 1;*
    works successfully, but
    *2. VAR WEIGHT=1 + 2;*
    fails with Error: 1012001 Invalid Calc Script Syntax [
    variations i've tried on *2* also fail WEIGHT = (1+2);, WEIGHT ( WEIGHT = 1+2; ); etc...
    Any ideas?
    Graeme.

    Setting a variable to a constant is fine byitself Var Weight = 1; but if you want to do math to set the varialbe it needs to be in a block statement. When you exit the block, the variable is no longer available. Try
    Var Weight;
    Weight = 1 + 2;
    "Weighted Sales = weight * sales;
    Notice the parens starting and ending the command that is the block command. Depending on what you are doing you might need to specify a member starting th command
    "Weighted Sales"(
    )

  • Logic Script - calculating Accounts with BAS()

    Hello experts,
    I am trying to write a script that includes a BAS formula to gather the sum of all the descendants.  I want to pull the value of all, less a few accounts.  This is the line of code I have, and it gives me an error around the BAS formula.  Is there a better way to do this?
    *WHEN ACCOUNT
    *IS BAS(P_EA3700)
    *REC(EXPRESSION = ([ACCOUNT].[BAS(P_EA3700)] - ([ACCOUNT].[A_51800020])), ACCOUNT = "A_FCST_3700", AUDITTRAIL = "CC")
    When I put an actual Account in place of the BAS forumla, it works.  The EA3700 has a lot of accounts within it, and i need the value of all, less this 51800020 account, and a couple others I will add when I figure out this code.
    Thanks!

    It Appears I did not copy all the way down the log, that is what caused the confusion.  Below are the records.  After reviewing this, I did some digging.  It appears the pull with the 40 records is pulling ALL the accounts with data for this entity, except those two we outlined in the script.  Including accounts that are not within the P_EA3700.  For Example, the first record, the account 46001000, is a personel expense account.  That appears to be the difference, when using the ELSE code, it appears to not keep the scope within the BAS(P_EA3700)
    DATA TO WRITE BACK:
    ACCOUNT AUDITTRAIL CATEGORY COST_CENTER RCOST_CENTER RPTCURRENCY TIME SIGNEDDATA
    A_51800020 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 70.22
    A_51800028 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 3738.52
    A_55200000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 100.00
    A_55205000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 5288.00
    A_55508000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 1364.07
    A_56230000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 9718.73
    A_98420599 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 315.24
    A_98420601 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 6587.39
    A_98420625 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 282.44
    9  RECORDS HAVE BEEN WRITTEN BACK.
    40 Record Log
    DATA TO WRITE BACK:
    ACCOUNT AUDITTRAIL CATEGORY COST_CENTER RCOST_CENTER RPTCURRENCY TIME SIGNEDDATA
    A_46001000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 35119.82
    A_46006000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 3503.76
    A_47100000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 2134.17
    A_47100001 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 499.12
    A_47100200 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 185.63
    A_47100300 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 784.83
    A_47100900 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 278.45
    A_47105000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 4982.17
    A_47200000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 3846.25
    A_47203000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 886.96
    A_47203001 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 2072.07
    A_47206000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 867.61
    A_47208500 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 2168.67
    A_47209500 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 5000.00
    A_47304000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 3.39
    A_51300000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 2089.09
    A_51500000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 17761.33
    A_51800020 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 70.22
    A_51800028 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 3738.52
    A_52105001 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 41.47
    A_52207000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 8.26
    A_52208500 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 2199.86
    A_53310000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 549.95
    A_53320000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 205.20
    A_55200000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 100.00
    A_55205000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 5288.00
    A_55508000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 1364.07
    A_56230000 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 9718.73
    A_92001102 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 5.00
    A_92001199 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 5.00
    A_97420599 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 315.24
    A_97420601 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 6587.39
    A_97420625 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 282.44
    A_97431010 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 74024.00
    A_97431030 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 13122.00
    A_98420599 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 315.24
    A_98420601 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 6587.39
    A_98420625 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 282.44
    A_98431010 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 74024.00
    A_98431030 ECC Actual CCA_7340016 RCCA_NONE LC 2013.01 - 13122.00
    40  RECORDS HAVE BEEN WRITTEN BACK.

  • Acrobat Pro 9, why is it ignoring my java script calculations?

    I am using a PC with Windows XP on it. This has happened many times, and I cant figure it out. I have layed out all of my cells and have given one column the java script commmand to subtract two other columns. I saved it, tested it, closed it, opened it and tested it again. Everything worked fine. I have come back into work this morning to find that the java script is still there and there are still 0's in the column, but it will not calculate anything. What's wrong?
    thanks!

    What  extra work! two, three lines of extra code (may just one) to put a time limit in, that can be overridden with entering a bought serial number. Even shareware peopel do it.
    And I remeber when Acrobat only worked on Mac's. You see it was introduced to Mac's first. Microsoft wouldn't allow it until version 3 or 4.  If I still had my 7100/66 I might could prove was I one of the beta Testers. But that machine was traded in on the G4-500 (which I still own).
    Most major software companies will come out with a new application on the Mac first. Because Mac users tend tobe willing to try out something new on the cutting edge. Then when its prefected they come out with a PC version, and forget about the Mac community.
    Look I am 61. And I didn't just fall off the turnip truck yesterday. I've been around since before the days of the moden internet. I  started with Buliten Boards on 300 baud modem on an old fashion POTS line.  Cost me a fortune in Phonebills
    So don't discount my experiences so lightly. I've used appliactions such as ATM Aldus PageMaker (yes you heard right Aldus). I've use Word Perfect for Mac and PC back when it was owned by WordPefect, then Novell) I've use Microsoft works when it came out for the SE/30. Lotus 1-2-3 both on Mac and PC, FaxSTF, and other that are now none existent on the Mac. Chance are I was using Computers about the same as some of you and probabaly earlier than some. I lived it.

  • Scripting calculations for subtotal and taxes = grandtotal

    I have a work form that lists cost of work preformed. 4 amount fields, a subtotal field, tax, and grand total. I am having an issue collaborating the subtotal, taxes and grandtotal. I have googled everywhere just for basic FormCalc help but to no avail. Any help you can give me will be very much appreciated.
    this is the script I foolishly 'thought' would work.
    Subtotal - Sum(AMOUNT, AMOUNT, AMOUNT, AMOUNT)
    Tax - Sum(TOTAL * .0825)
    Grandtotal - SUM(TOTAL, TAX)
    I have ran the syntax check on all fields no errors, but I get some extremely weird output when integers are place in the amount fields.
    layout --------------
    amount
    amount
    amount
    amount
    subtotal
    taxes
    grand total
    they are all numeric fields (i don't know if all this is relevant but I'm trying to make this as easy as possible for you to troubleshoot)
    thanks in advance
    skyler

    Sklyer,
    The attached is a sample using FormCalc for what you are trying to achieve. In the future you should post requests in the LiveCycle Designer ES forum if the request does not include Barcoded Forms ES. The Designer forum is monitored more closely.
    Steve

  • Problem with action script calculations

    I have a simple action script 3 code that will not calculate the correct answer on my PC.  I'm running flash cs5 on Window 7 OS.  I can move the file to another machine running  flash cs4 and it works, but when I run it on my laptop, I get funky answers.  see cold below.  I have uninstalled and reinstalled cs5 , run the cleanscript for cs5 and cs4 to make sure everything was removed.  I have uninstalled and reinstalled flash player.  but nothing seems to work.  Any help will be appreciated.  It acts like Action Script 3 is corrupt or something else that related to Action Script 3.  Everything else seems to work.  I also have a preloader running with the same issue.  It is should be showing the percentage completed but it go 2 5 50 4 32 or something funky like that.  Please help.
    the code I'm using.
    function calculateTotal(evtObject:MouseEvent):void {
       var price:Number;
       var totalCost:Number;
       var numberOfJerseys:Number;
       if (jerseyType.text == "2") {
        price = 12;
          if (jerseyType.text == "1") {
        price = 10;
       if (playerNames.text == "Y" || playerNames.text == "y") {
        price += 1.50;
       numberOfJerseys = int(numberOfPlayers.text) +int(numberOfCoaches.text);
       totalCost = numberOfJerseys*price;
       total.text = String(totalCost);
    calc_btn.addEventListener(MouseEvent.CLICK, calculateTotal);     
    the preloader percentage is
    var percent:int = amtLoaded*100
    percent_txt.text = String(percent);

    HELLO,
                  just check       navigateToURL()

  • Inserting Images into Acrobat Pro Form And using java script calculation to change it

    Hi,
    I am trying to create a form witch shows text results bassed of tick boxes and I have managed to be able to do that but I need to have icons shown along side them based upon the result and I am not even sure how to input images in the first place.
    I read somewhere that I have to use the content pane but I dont have it and it is not selectable in the view options.
    Also the image I am trying to insert is .ai will it need to be .jpg or .png?
    any help would be greatly aprectiated!
    Thanks,
    Bruce

    That works the only thing is that when another one is selected it stays visible i have tried this
    this.getField("Button1").display = event.target.value=="Off" ? display.hidden : display.visible;
    this.getField("Button2").display = event.target.value=="On" ? display.hidden : display.visible;
    this.getField("Button3").display = event.target.value=="On" ? display.hidden : display.visible;
    this.getField("Button4").display = event.target.value=="On" ? display.hidden : display.visible;
    and alternated them between which one needs to work but that didnt work either, any ideas?
    Thanks,
    Bruce

  • SQL Script VS HANA views

    Hi Gurus,
    We are in the process of building the SAP HANA views. As we know there are multiple options
    1) Attribute , Analytic & Calc views
    2) Scripted Calculation views and CE functions.
    I have read many articles and as per SAP Documentation, they say build the information view with  Attribute, analytic and calculation View (Graphical) If it does not suffice they go for scripted calculation view.
    Just wanted to understand. Are there any limitations or any issues faced in the projects with scripted calc views. If we look at the John Appleby tips, it suggests that avoid SQL script unless it cannot be done with graphical views.
    http://scn.sap.com/community/hana-in-memory/blog/2013/12/29/6-golden-rules-for-new-sap-hana-developers
    If we build the views with graphical method, then it seems the parallelism can very well achieved ,means query is split into multiple sub queries and executed in parallel as in Visualize plan.
    If we write the Sql script, can this parallel processing  achieved or not ?  If the requirement can be achieved without writing script which method to choose.
    I have included the 10 to 12 attribute views in analytic view then Calculation view; it seems there may be some performance issue which I am going to check. As we know we can use base table directly in calculation view. What is the best method to use .Can we use these base  tables in calculation view directly or build the attribute views first, then analytic  view and after that build calculation view.
    As we know we use the attribute views from re usability perspective.  Is there any other reason that we need to use attribute views instead of joining the base tables in calc view .
    Regards
    Ram Ramanathaiah

    Thank you Krishna for the answers. I have gone through those links. But there is nowhere consensus opinion that the way we use the views. Some of the answers conflict each other .When we are starting the project we need to make decision about the best approach we wanted to take. If possible I would like to understand more about this from you and other experts.
    1) Build the views with Attribute analytic or calc views or
    2) Build the views only with base tables in calc views or
    3) Build everything using the SQL script /CE functions.
    Regards
    Ram

  • Auto check calculating the Average

    I do not know how to approach an issue with my form, so any help or quide will be appreciate very much!
    For a Performance Form I have 5 sections for the managers to fill in.
    Every section includes an Assessment drop down list with 5 items to select from.
    Items for DDList (Named:Assessment):
    Outstanding
    Exceeds Expectations
    Meets Expectations
    Needs Improvement
    Does Not Meet Expectations
    Final at the end of the form I have a section named
    OVERALL SUMMARY OF PERFORMANCE with 5 check boxes named:
    Outstanding
    Exceeds Expectations
    Meets Expectations
    Needs Improvement
    Does Not Meet Expectations
    Is it possible with a script(Calculating the average?), AUTO to check(one of the check boxes for the Overall sum of performance?
    THANK YOU
       

    Hi Niall, I took your advise form your last sample cindle you have send me, I am close but still I have a problem at the end of the line!
    Here what I have till now:
    On change event for the Area1 the script below:
    switch 
    (xfa.event.newText){
    case 
    "Outstanding":
    NumericField1.rawValue
    = "5";
    break 
    case 
    "Exceeds expectations":
    NumericField2.rawValue
    = "4"; 
    break 
    case 
    "Meets expectations":
    NumericField3.rawValue
    = "3";
    break 
    case 
    "Needs improvement":
    NumericField4.rawValue
    = "2";
    break 
    case 
    "Does not meet expectations":
    NumericField5.rawValue
    = "1";
    break 
    For a NumericField1(Score for Outstanding) on Calculate event the script:
    var  vScore=0 ;  
    for  (var i=0; i<5; i++){
    if  (xfa.resolveNode("optionA[" + i + "]").rawValue=="5")vScore
    +=xfa.resolveNode("optionA[" + i + "]").rawValue;}
    NumericField1.rawValue= vScore ;
    This I am getting(for NumericField1) is for example select Outstanding for all DDL is:55555 than 25 which is the desire!
    How I can make it work, where is my mistake?
    Thanks Niall

Maybe you are looking for

  • Creative Zen Touch stuck in Recovery M

    Bear with me please since my english is not the best, but I'll try to explain my problem as good as I can. Both me and my girlfriend have Creative Zen Touch mp3-players, and yesterday we were gonna update the firmware on both of them. We went to the

  • Patch Oracle 9.2.0.6 on linux with Jan 2006 CPU - inventory not updated

    Hi, We have tried to apply the Jan 2006 CPU (4751921) patch to Oracle 9.2.0.6 running on linux (redhat AS 4). The Apply log reports: Patch 4751921 has been applied successfully. ... but then when trying to Update inventory it reports: INVENTORY PROBL

  • How do I download a movie that I've rented?

    How do I download a movie that I've rented. Says I've rented but have not downloaded. When I attempt to try and find downloads as it suggests I'm finding nothing.

  • Icons in java

    i have 10 diffrent icons(GIF) in my program. is there an idea to keep these in one file, class, GIF, or any think like that? i know the Q is curious, somebody asked me about that. thx

  • Widgets don't exist

    I've been looking at some of the widgets and they just don't exist. For example I clicked download from the apple website and I get directed to this http://www.beatportmania.net/tool/beatport2.wdgt.zip . I also tried to download the cheezburger widge