Sum Column Script

This is not working; THANK YOU to anyone kind enough to point out what's missing.
   <field h="5.293mm" name="IncomeTotal" w="19.134mm" x="54.478mm" y="126.775mm">
            <ui>
               <textEdit>
                  <border hand="right" presence="hidden">
                     <?templateDesigner StyleID aped0?></border>
                  <margin/>
               </textEdit>
            </ui>
            <font size="11pt" typeface="Myriad Pro"/>
            <para vAlign="middle"/>
            <traversal>
               <traverse ref="TextField4[3]"/>
            </traversal>
           <sum(IncomeTotal [Income1, Income2, Income3, Income4, Income5, Income6, Income7, Income8, Income9])>
         </field>

Hi,
First of all I would not recommend inputting script directly in the XML Source. If you go to the Design View you can open the Script Editor (5) from the Windows menu. I would recommend making it larger, so that you can see a few lines of script:
You can see an example here for referencing objects in both JavaScript and FormCalc. This also includes an example for summing columns: http://assure.ly/kUP02y.
Niall

Similar Messages

  • Adobe Request: multi-column scripts

    Hi guys/gals,
    We're looking for examples of multi-column scripts as we develop Story.  If any of you here have real-world examples and want to share them, please send me a private message on how we can get them.
    Thanks in advance for any assistance!
    Dennis

    I don't have any to hand, but I recall working on a medical program as a grip that used one.  The format was 4 columns, Program time, video, graphic, and audio.  It worked as both a shooting and editing script.
    I've been trying to get a producer I work with to buy some software so we can have such a script, instead of his preferred "winging it" style of working, which usually means I go scrounging for a shot in post because we don't have enough footage.

  • Does Adobe Story Free have a Type and template for stageplay format and if so where do I click for it. In the Type button I could only find screenplay, TV script, Two column script, AV script and other, but not for stageplay?

    Does Adobe Story Free have a Type and Template for Stageplay format and if so where do I click for it? In the Type button I could only find, Screenplay, TV script, AV script, Two column script, and other but nothing for Stageplay.

    Does Adobe Story Free have a Type and Template for Stageplay format and if so where do I click for it? In the Type button I could only find, Screenplay, TV script, AV script, Two column script, and other but nothing for Stageplay.

  • Help Needed to Sum Column in Fixed Table

    I am new to LiveCycle.  I need to sum a column in a fixed table.  My rows are summing correctly.  I have tried every formula on the web both in FormCalc and Javascript.  I've cut and pasted script from Adobe templates and from forms on the web.  Nothing is working.  Each change produces a new set of errors.  The Hierarchy is:  (untitled Subform) (page 2), Table 2, Header Row {Header Row contains Year 1, Year 2...Year 5}, Row1 {Row1 contains Text Title, Cell2, Cell3, Cell4, Cell5, Cell6, (untitled Numeric Field) which is a calculated sum of Years 1-5}, Row2, Row3...Row7 are exactly the same.  I want to calculate the sum of each column in the footer row but I keep getting script errors.

    I am new to LiveCycle.  I need to sum a column in a fixed table.  My rows are summing correctly.  I have tried every formula on the web both in FormCalc and Javascript.  I've cut and pasted script from Adobe templates and from forms on the web.  Nothing is working.  Each change produces a new set of errors.  The Hierarchy is:  (untitled Subform) (page 2), Table 2, Header Row {Header Row contains Year 1, Year 2...Year 5}, Row1 {Row1 contains Text Title, Cell2, Cell3, Cell4, Cell5, Cell6, (untitled Numeric Field) which is a calculated sum of Years 1-5}, Row2, Row3...Row7 are exactly the same.  I want to calculate the sum of each column in the footer row but I keep getting script errors.

  • Auto sum Column accumulated value in gridview

    The principle seems simple but I'm in trouble. Did anyone have an example or script to auto sum of a column in the gridview. Explain, I have a gridview with the columns:
    amount, unitary value, total value and accumulated value. I need the accumulated value column add the previous value
    to the current value. For example:
    quantity unitary_value total_value accumulated_value
    10 10,00 100,00 100,00
    20 50,00 1.000,00 1.100,00
    5 500,00 2.500,00 3.600,00
    Basically it would be up. The column value (accumulated value) takes the value of the previous line and adds to the current value.
    If you can help !!
    Thank you for your attention.
    Thank you for your attention.

    No you're right with the calculation of the first post, I got it wrong. Now check the below solution, you need to use RowDataBound event of the gridview to do the calculation and print in the cell:
    //This is just a method to fill the datatable with dummy data(you can ignore in your code)static DataTable GetTable()
    // Here we create a DataTable with four columns.
    DataTable table = new DataTable();
    table.Columns.Add("quantity", typeof(double));
    table.Columns.Add("unitary_value", typeof(double));
    table.Columns.Add("total_value", typeof(double));
    table.Columns.Add("accumulated_value", typeof(double));
    // Here we add five DataRows.
    table.Rows.Add(10, 10, 0, 0);
    table.Rows.Add(20, 50, 0, 0);
    table.Rows.Add(30, 40, 0, 0);
    return table;
    protected void Page_Load(object sender, EventArgs e)
    //Bind the gridview to the datatable
    GridView1.DataSource = GetTable();
    GridView1.DataBind();
    //Global var to keep accumulated value of each rowo
    double _accumulatedvalue = 0;
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    if (e.Row.RowType == DataControlRowType.DataRow)
    //Create total value column by multiplying cells 1 and 2(maybe you don't need this)
    Double val = Convert.ToDouble(e.Row.Cells[0].Text) * Convert.ToDouble(e.Row.Cells[1].Text);
    e.Row.Cells[2].Text = val.ToString();
    //Accumualated value and fill the cell related (you can replace val below with Convert.ToDouble(e.Row.Cells[2].Text)
    _accumulatedvalue = _accumulatedvalue + val;
    e.Row.Cells[3].Text = _accumulatedvalue.ToString();
    Fouad Roumieh

  • Summing column values in sortable dataset

    http://cccw.ecologik.net/admin/lookup/
    Simple page that has a reapting region that is sortable. You notice at the bottom of the table I have a "Total Saved." I would like this to be able to sum up the pSaved column. I know I could get this dynamically when I first create the table in php but once the user sorts, how can I recount the pSaved column? I would think this is a common request but can't seem to find anything about it out there!
    Thanks for any help in advance.
    Jon

    Thanks for the response. After a bit of digging I came up with a solution myself.
    I simply added decided to sum the fields as they went through the filterFunc()
    if (!document.getElementById("containsCB").checked)
        regExpStr = "^" + regExpStr;
        sumOfFields=0
        var regExp = new RegExp(regExpStr, "i");
        var filterFunc = function(ds, row, rowNumber){
           var columnNames = ["Last","First","email","watershed","pledge","City"],
           result = false;
             for( var i = 0; i < columnNames.length; i++ ){
                        // search for a match
                   if( row[ columnNames[i] ] && row[ columnNames[i] ].search( regExp ) != - 1 ){
                        result = true;
                        sumOfFields=sumOfFields + Number(row["pSaved"])
                        break; // stop looping.
    on the table page itself I added small piece of code.
    <script type="text/javascript">
              document.getElementById("resultsArea").innerHTML=sumOfFields;
    </script>
    Works like a charm! Thanks again for the input!

  • Preview does not sum column data in PDF forms

    Preview is way better than Acrobat for most purposes, but it has some basic limitations that just make it hard to use. for example I have to use this form that asks you to enter $ in a table, however Preview does not sum the column, it just puts a "0" in. Why doesn't Preview add? Plus, this default behaviour makes it harder to paste in my own number as there is a zero in the way. At least it would be nice if it could just remove the 0 and leave me with an editble section. Is this just the product of a badly created PDF form or, as I suspect, a limitation of Preview?

    I'm having the exact problem. I have a fillable PDF form that has many checkboxes. Saving the pdf (doesn't matter whether it's 'Save', 'Save All', or 'Save As' under the File menu) will clear/reset the checkboxes in the file.
    Anyone know of a workaround for this? Or, is Apple fixing this soon? I really don't want to get Acrobat Pro 9 (well, I don't think it's compatible with Snow Leopard yet anyway)
    If you'd like a sample PDF file to try it out, let me know.
    Thanks.

  • Need help with summing column when using if-then-else

    Using logic
    <?xdofx:if INVOICE_BILL_AMT_IN_INV_CURR is null then INVPROC_BILL_AMOUNT else INVOICE_BILL_AMT_IN_INV_CURR end if?> for column field.
    Having trouble summing the column using the logic above.
    Any suggestions would be very much appreciated.
    Thanks,
    Nancy

    Thanks Tim,
    That worked. Got rid of my error. However, if the field is null (=''), I get a total.
    11.05 + 1429.70 = 1440.75
    If the not null (!='') I am not getting a total.
    103.74 + 173.13 =
    BTW, recently took XML class. Leta Davis highly recommended your blog and I have gotten a lot of great tips from it.
    Thanks,
    Nancy

  • Show sum column item Report in another item TEXT ?

    I have a report region to the query "select * from emp" and would like to display the sum of the salt field in another item using the TEXT APEX_APPLICATION.G_F01 rather than run the querie again without using a submit button, or whenever to have a page refresh the data are updated. This has to do?
    Ps: My apologies for my English because I used google translate.

    you need to use lookup column .
    Try this 
    http://blogs.sharepoint911.com/blogs/jennifer/Lists/Posts/Post.aspx?ID=53

  • How do you sum columns in same view

    I have a search component (drag and drop the viewCriteria) with a table.
    In the table is a column for an amount (number). I need to sum the amount and put it in the footer.
    I have done this many times with master/detail. Lots of info on that on the web as well. Really simple.
    In the view:
    So I create a transient attribute (sumAmount).
    I set the value to Expression and use one of the following (and several others that are not here).
    On the screen:
    drag SumAmount from the DC onto the footer. (OutputText no label)
    OK so far!?
    Run and query - (wishful thinking)
    Change the query and new totals appear (not that far yet).
    I have tried several permutations.
    adf.object.sum("Amount")
    sum("Amount")
    adf.object.ViewVO.getrowset.sum("Amount")
    All show absolutely nothing - I have the output text defined in the footer and the footer is displaying fine.
    The table also has some dates in the criteria - when I generate the rowImpl - the search panel is rendered useless due to the Date Domain vs Sql Date ( I know how to manage this)
    This has to be simple - just need to get a bit of help on it.
    I have tried to do this similar to the master/detail (but in this case - no detail). Still no value.
    I should be able to create a "formula" column without the use of java rowImpl.

    Finally - I have all the pieces - they are (were) as follows.
    1) create the View Object.
    2) add the summary column (transient) (be sure to get the data type correct (Number or BigDecimal)).
    3) create the view object implementation. (the Java tab in the view object - first box)
    4) create the view row implementation and expose the accessors. (the Java tab in the view object - second box).
    5) use Steve Muench's help to do the summation - it is a bit tricky and it has a depreciated call in it - but it works. (it is easy to modify to fit - just get the right attribute name for the sum & data type - I used Big Decimal)
    http://otn.oracle.com/products/jdev/tips/muench/recalctotalvo/RecalcTotalOfRowsInVO.zip (may have to look for the proper link - I found a lot of broken references)
    6) add a footer to the table in the search page and drag and output text box into it (all one step with drag and drop) - leave it empty.
    7) in the bindings page of the screen - add an attribute binding for the summary column from the Application Module.
    8) once the binding is made, go back to the output text box and use the inspector to create an expression and bind the value to "adf bindings" - data - and select the view-backing definition from the binding you just created.
    9) if you want to format this to right justified - surround with JSF HTML "panel grid - 1 column width=100% and style= text:align right - I usually do bold as well.
    10) sit back, relax and run - it should work.

  • Calculating sum in script logic

    Dear all.
    I am having a script which should be moving values from one parent account to another base account in default logic, but only if posted on certain other dimension, that is when not posted on a certain Brand in my brand dimension.
    Sounds pretty much simple..
    *WHEN CATEGORY
    *IS ACTUAL
    *WHEN BRAND
    *IS <> B_2600
      *WHEN ACCOUNT
      *IS  BAS(GROSS_PREORDER)
        *REC(EXPRESSION=([ACCOUNT].[GROSS_PREORDER]) ,ACCOUNT=GROSS_PREORDER_NOST)
      *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    So if any values are posted on a base member of "GROSS PREORDER"-account, then put it onto GROSS_PREODRE_NOST, but only if CATEGORY = ACTUAL and BRAND different from B_2600.
    The above script works fine, as long as I only post one record at a time, but that's not realistic. The users necessarily need to be able to input data on all base members of GROSS_PREORDER and then send data.
    When you post eg. on three separate accounts below GROSS_PREORDER the result is posted three times onto GROSS_PREORDER_NOST.
    I cannot seem to find a good solution for this, but I don't think I'm the first facing this issue..?
    Best regards
    Mogens
    PS. I am using BPC NW 7.5 SP05

    Hi Nilanjan.
    That works.
    I don't really see why it should work compared to my first script, but isn't that just the irony of script logic..?
    In order to not put every and all data into my sum account I modified
    *WHEN ACCOUNT
      *IS *
    to
    *WHEN ACCOUNT
      *IS BAS(GROSS_PREORDER)
    Thank you very much for your help..
    Br.
    Mogens

  • Add/change datatype column (scripting)

    Hello,
    I am writing a script to add default columns and their values to tables. So far for me it's possible to add columns to an existing table in the model.
    Next I want to add the value for datatype. I found out there's a method called getDataType(). Until now, I didn't find the 'setter; for this property.
    Like other scripts, I started with create a table with columns and then using the API to read the values.
    A simplified version of my code:
    // get columns array
    var myTab = model.getTableSet().getByName("T_POSITIONS");
    colArray = myTab.getElementsCollection().toArray();
    // loop over columns
    for(i = 0; i < colArray.length; i++){
      var dataType = colArray[i].getDataType();
      model.getAppView().log(colArray[i] + " has datatype " + dataType );
      colArray[i].setDataType("VARCHAR2 (1)");
    An error occurs when I want to run this script: Cannot find function setDataType in object ID.
    I cannot find the right method to add/modify the datatype property.
    Any tip would be appreciated.

    Hi Bart,
    here is what is in XML file for column:
    <Column name="FIRST_NAME" id="5E8F1EEC-287E-6496-C568-DFBF6321BD91">
    <sourceConnName>FDB11R21</sourceConnName>
    <sourceObjSchema>EMPLOYEES</sourceObjSchema>
    <sourceObjName>FIRST_NAME</sourceObjName>
    <createdBy></createdBy>
    <createdTime>2015-01-13 12:45:08 UTC</createdTime>
    <commentInRDBMS>First name of the employee. A not null column.</commentInRDBMS>
    <ownerDesignName>HR_870</ownerDesignName>
    <nullsAllowed>true</nullsAllowed>
    <useDomainConstraints>false</useDomainConstraints>
    <use>1</use>
    <logicalDatatype>LOGDT024</logicalDatatype>
    <dataTypeSize>20 BYTE</dataTypeSize>
    <autoIncrementCycle>false</autoIncrementCycle>
    </Column>
    <dataTypeSize>20 BYTE</dataTypeSize>
    So you need to set size to "20 BYTE" or "20 CHAR"
    Philip

  • Sum Columns in a jTable?

    (Wasn't completely sure where to post this... but jTable is Swing, right?)
    I have a jTable displaying a database table containing integers corresponding to seats booked. I want to sum these integers in a final column.
    However, the table also contains Primary and Foreign key columns which are also integers. I don't want to sum these, obviously.
    Like this:
    PKey FKey1 FKey2    Col1  Col2  Col3  Col4  Total
    1    2     3        1     0     2     1     4
    2    3     3        1     1     2     2     6
    3    6     8        1     3     1     1     6However, I really haven't been doing this very long, and have no idea where/how to sum these values. Do I write some kind of renderer? Can I do some kind of "int Total = Col1+Col2... etc;"? Or do I sum the values on a lower level and then display the result in the table? In other words: "Help! I'm lost!"

    Well you would probably calculate the total as you first populate the TableModel.
    Then if you data changes dynamciallly you would use a TableModelListener to recalculate the total. Here is a simple example:
    [http://forums.sun.com/thread.jspa?forumID=57&threadID=566133]

  • Total a summed column

    Hi everyone,
    I have a question regarding a report that I'm working on. I have a column that uses the following formula: (Sum(material_qty))*1.5. I want a grand total at the bottom of the page of this column; however, it doesn't appear. Is it because Discoverer cannot do nested aggregations? I would appreciate any help or suggestions.

    Hi,
    Maybe you have wrong joins. You can't make a total using master folder values.
    If it's no the problem, you can modify pref.txt file if you are using Plus or Windows Registry if you are using Desktop.
    Hope this helps.

  • Sum columns in datagrid

    Hi All,
    I have a DG with multiple columns (Numbers), the values are coming from an array collection.
    What is the best way to sum couple columns? like
    Column01 + Column02 = ColumnTotal
    I try using a labelFuction in the column like:
    private function sumColumns(item:Object, col:DataGridColumn):String {
       var tempNumber:Number = parseFloat(item.column01) + parseFloat(item.column02);
       return tempNumber.toString();
    But the result doesn't reflect in the arraycollection. Should I create the column with values at the time of received the results?
    If I do this, when I change the value in any of the columns 01 or 02 it doesn't change the total.
    Thanks for your help.
    Johnny

    Yes, immediately after u receive the result create another property in the and assign the sum of two columns to it and then assign it to the datagrids data provider. the property that you create will be mapped to the column which shows the sum. if you are using label function to get the sum you can se a lot of calls med to the label function even when you scroll, this is all unnecessary memory hog.

Maybe you are looking for