ADF Table: sum of column value

Hi Experts,
I have a editable table which is having "Quantity of Volume" column.When user ll input the value in to this,Then the lower panel should show the sum of Volume. How I ll do this? Below is my table src code:
<af:table value="#{bindings.NominatedAllocationType2.collectionModel}"
var="row" rows="#{bindings.NominatedAllocationType2.rangeSize}"
emptyText="#{bindings.NominatedAllocationType2.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.NominatedAllocationType2.rangeSize}"
rowBandingInterval="0" id="t2">
<af:column sortProperty="TheQuantityOfVolume" sortable="false"
headerText="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.label}"
id="c6">
<af:inputText value="#{row.Volume.bindings.TheQuantityOfVolume.inputValue}"
label="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.label}"
required="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.mandatory}"
columns="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.displayWidth}"
maximumLength="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.precision}"
shortDesc="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.tooltip}"
id="it1">
<f:validator binding="#{row.Volume.bindings.TheQuantityOfVolume.validator}"/>
<af:convertNumber groupingUsed="false"
pattern="#{bindings.NominatedAllocationType2.hints.Volume.TheQuantityOfVolume.format}"/>
</af:inputText>
</af:column>
</af:table>
Thanx
Aswini

Hi.
Check
Calculate Sum in VO issue again
http://technology.amis.nl/blog/1295/creating-a-dynamic-ajax-column-footer-summary-in-a-table-component-using-adf-faces

Similar Messages

  • Jdev 10g, ADF- expression based on column value

    Hi,
    I have an ADF table with a column in it that is populated through a data control. The column can be one of five values (1 - 5) which mean different statuses (Approved, Denied, Pending, etc). I was just wondering if anyone could recommend a way to do the translation in the table column.
    I was looking at the expression builder but it didn't seem like it would take more than the #{row.Status==1 ? 'Approved': 'Others'} and I have 5 different statuses that I'd like displayed to the user.
    Thanks

    Hi,
    yes you can nest conditions like here:
    inlineStyle="#{row.Status == '1' and row.ErrStatus == '0' ? 'color:rgb(0,255,0);' : row.Status == '2' and row.ErrStatus == '0' ? 'color:rgb(210,170,0);' : row.ErrStatus == '1' or row.ErrStatus == '5' ? 'color:rgb(0,0,255);' : row.ErrStatus == '3' ? 'color:rgb(255,0,255);' : row.ErrStatus == '4' or row.ErrStatus == '9' ? 'color:rgb(255,0,0);' : row.ErrStatus == '2' ? 'color:rgb(205,0,0);' : ''}
    {code}
    regards,
    Branislav                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Create multiple capture processes for same table depending on column value

    Hi,
    is it possible to create multiple realtime downstream capture processes to capture changes for the same table depending on column value?
    Prakash

    i found it - by using subset rules
    prakash

  • Sum datagrid column values

    I am looking for a way (action script code?) to sum datagrid
    column values.
    I am using Flex2 with Cold Fusion MX7.
    I populate a DataGrid by setting dataprovider to the result
    of a Coldfusion query.
    (this.masterList.dataProvider = event.result as
    ArrayCollection;)
    This all works fine.
    The masterList datagrid has debit, credit, and unitcost
    columns. I want to sum those columns individually, and display the
    results in text boxes in another panel.
    I could run a Coldfusion query to return the sums, but would
    like to do it on the client side with action script.
    I want to sum them everytime I update the datagrid, so need
    action code that I can put in the result function.
    I am new to ActionScript, and not sure how to loop through
    the array collection(and/or) dataprovider and sum the items.
    Any help would be appreciated.
    Thanks.

    Loop through your array..if the arrayCollection was named
    myArray;
    private sumFunction():Number{
    var sum:Number=0;
    for(var i:uint=0;i<myArray.lenght;i++){
    sum+=myArray
    .debitValue;
    return sum;

  • How to sum a column value using CAML Query?

    Hi All,
    I would like to sum the column value using CAML qeury. Actually in my list, I have two column "Projects Name" and "Number of Issues". Now need to get sum of "Number of Issues" column. How to achieve in CAML Query.
    Thanks in advance!

    Hi Sam,
    it looks like you can use your current view based agregation, otherwise it is not possible(
    http://msdn.microsoft.com/en-us/library/ms467521.aspx) and you need to work on custom bit on this requirement.
    use the below link and create a view element as described and see if that works for you
    Aggregations Element
    http://msdn.microsoft.com/en-us/library/ms468626%28v=office.12%29.aspx
    Another reference
    Query Element
    http://msdn.microsoft.com/en-us/library/ms471093.aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • CFGRID - Sum of Column Values

    Hi,
    Is there a way to sum | total a column of numeric values in a
    cfgrid? I want to populate a cfinput text box with the number, and
    bind it so that as changes to numbers occur on the grid, the
    cfinput box changes.
    I've been able to do this by creating a function that goes
    and extracts the information via a database query. Running the
    query seems to add overhead to the screen response time.
    The variable could start as a value passed from a query. Say
    2000. When a field changes, it would take the original value,
    subtract out the original "row" value, then add in the new "row"
    value. Say a 2 is being replaced by a 3. Then you'd have 2000-2+3 =
    2001 which becomes the new "original" total value.
    Any thoughts would be appreciated.
    cfwild

    Hi Dan,
    Thanks for the feedback. The grid really works well for what
    I'm trying to do. I can filter the pages and make minor changes to
    the data quite quickly. When I add in the extra function (to sum
    the column) that goes out to the table to extract the data, it
    seems to take a performance hit on the "page".
    In looking at the code I've seen, it seems easy(?) to get to
    the new value of the column. Is there a decent way to get to the
    "old" value of the column, prior to an update? (or as you update)?
    cfwild

  • Multiple row selection in ADF Table using addition column with checkbox

    I am using ADF table(Jdeveloper11g) and i want to selecte multiple rows it may be more than one OR all rows.
    For that i added one Column to the table with Header Delete and checkbox
    <af:table....
    <af:column sortProperty="Delete" headerText="Delete" width="100"
    sortable="false">
    <af:selectBooleanCheckbox label="#{row.favoriteId}"
    valueChangeListener="#{Mybean.onCheck}"
    id="checkbox" autoSubmit="true">
    </af:selectBooleanCheckbox>
    </af:column>
    </af:table>
    backing bean:Here i added code to get Value of one column with id favoriteId and use an arrayList(listForDelete) to monitor the state of the checkboxes
    public void onCheck(ValueChangeEvent valueChangeEvent) {
    BindingContainer bindings = getBindings();
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)bindings.get("getUserFavoritesByUserIDIterator");
    if (iterBind != null && iterBind.getCurrentRow() != null) {
    RichSelectBooleanCheckbox ch = (RichSelectBooleanCheckbox)valueChangeEvent.getSource();
    if (!ch.isSelected()) {
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.add(issueId);
    else
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.remove(issueId);
    Problem is that when i select single row checkBox, onCheck() method of backing bean gets called multiple times(equals to the number of rows)
    I think this is beacuse of <af:selectBooleanCheckbox id is same that is "checkbox" but i am not sure.Even i tried to assign some unique id but no any success in assigning Id with value Expression.
    I also find related post
    Re: ADF Table Multiple row selection by Managed Bean
    but that is related to Select All rows or Deselect all rows from table.
    From the simillar post i follow the steps given by Frank.but problem with below step
    ->have an af:clientAttribute assigned to the checkbox with the following EL #{row.key} ,here I added <af:clientAttribute name="#{row.key}"></af:clientAttribute> and i am getting error
    Error(64,37):  Static attribute must be a String literal, its illegal to specify an expression.
    Please let me know if any one had already implemented same test case.
    Thanks for all help
    Jaydeep
    Edited by: JaydeepJ on Aug 7, 2009 4:42 AM

    just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
    DCBindingContainer bc =
    (DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
    DCIteratorBinding profItr =
    bc.findIteratorBinding("ProfileSearchInstIterator");
    Row cRow = profItr.getRowAtRangeIndex(0);
    if(cRow != null){
    System.out.println("Current row is not null so fixed ");
    profItr.setCurrentRowIndexInRange(0);
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(cRow.getKey());
    rks.add(keyList);
    profileTable.setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
    }

  • Querying the schema for table name with column value!

    In my schema i have 500+ tables and other objects.
    i have a column with the name BO_PRODUCT_CODE.
    I wants to know in what tables the value of BO_PRODUCT_CODE='FX03'.
    i have query the user_tab_columns which gives me the result with 90 tables having the column BO_PRODUCT_CODE.
    What is query which will give me the exact number/name of the table whose column value is FX03. ie, BO_PRODUCT_CODE='FX03'.

    Hi you can use this approach:
    BEGIN
    v_str VARCHAR2(250);
    v_count NUMBER :=0;
    DECLARE
    FOR loop_tbl IN ( SELECT DISTINCT table_name FROM USER_TAB_COLUMNS
    WHERE column_name ='BO_PRODUCT_CODE' )
    LOOP
    v_str := 'SELECT COUNT(*) FROM ' || loop_tbl.table_name || ' WHERE BO_PRODUCT_CODE=||'''' ||'FX03' || '''' '
    EXECUTE IMMEDIATE v_str INTO v_count ;
    IF v_count > 0 THEN
    DBMS_OUTPUT.PUT_LINE ('Table Name :'|| loop_tbl.table_name || ' Count :'||v_count);
    END IF;
    v_count :=0;
    END LOOP;
    EXCEPTION
    WHEN others THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    Please remove if any syntax error.
    Regards

  • Inserting rows into table Based on Column Values.

    Hi,
    I am trying to inserting rows into a table based on Column.
    Id      Name        
    Data
    N 105.1.1
    http://www.example.com/New/105.1.1
    U 105.1.2               http://www.example.com/Used/105.1.2
    S 105.1.3               http://www.example.com/Sold/105.1.3
    I want a table like this. 
    I want to insert Data column value based on Id and Name Columns
    If Id = N and Name = 105.1.1 then Data value should be insert as   http://www.example.com/New/105.1.1
    If Id = U and Name = 105.1.2 then Data value should be  insert as  http://www.example.com/Used/105.1.2
    If Id = S and Name = 105.1.3 then Data value should be insert as   http://www.example.com/Sold/105.1.3
    Can you please help us to write query to insert above Data Column values based on Id and Name Columns.

    INSERT INTO tbl (col) SELECT
    CASE WHEN id='N' and Name='105.1.1 ' THEN 'http://www.example.com/New/105.1.1'
              WHEN id='U' and Name='105.1.2 ' THEN 'http://www.example.com/New/105.1.2'
    END col
    FROM anothertbl
    Sorry , cannot test it right now.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to create a table with editable column values.

    Hi everyone,
    I think this is very simple but i'm not able to find how to do this. This is my requirement. I need to create a table with n columns and 1 row initially. user should be able to enter data into this table and click of a button should insert data into the data base table. Also there should be a button at the bottom of the table to add 1 row to the table.
    I know how to do the insert to database, but can anyone please let me know how to create a table that allows user to enter data and how to create a add 1 row button?
    Thanks in Advance!

    Raghu,
    Go through the ToolBox tutorial Create Page & Advanced table section of OAF Guide.
    Step 1 - You require to create EO & a VO based on this EO. This EO will be of DataBase table where you want to insert the data.
    Step 2 - Create a Advanced table region. (Refer this Adavanced table section for more on this)
    Step 3 - Attach this VO in the BC4J component of Adavanced Table region.
    Regards,
    Gyan

  • Compare tables in two schemas for the table with particular column & value

    Hello All,
    I have a query to find out the list of table from a given schema to extract all the tables having a search column .
    ex :
    SELECT OWNER, TABLE_NAME, COLUMN_NAME FROM
    ALL_TAB_COLUMNS WHERE OWNER='<SCHEMA_NAME>'
    AND COLUMN_NAME='<COLUMN_NAME>'
    I want to compare two schemas for the same above query .
    Can we wirte a query on this - I am using SQL DEVELOPER , which has menu item - TOOL - database differneces to find the diffenence between two schemas but my requirement is to find the differences in two schemas for all the tables matching for a particular column ( as given in quer).
    Appreciate your help.
    thanks/Kumar
    Edited by: kumar73 on 29 Nov, 2012 1:50 PM

    Hi, Kumar,
    This is the SQL and PL/SQL forum. If you have a question about SQL Developer, then the SQL Developer is a better place to post it. Mark this thread as "Answered" before starting another thread for the same question.
    If SQL Developer has a tool for doing what you want, don't waste your time trying to devise a SQL solution. The SQL Developer way will probably be simpler, more efficient and more reliable.
    If you do need to try a SQL solution, then post some sample data (CREATE TABLE and INSERT statements for a table that resembles all_tab_columns; you can call it my_tab_columns) and the results you want from that data.

  • Sum of column values

    Hi
    My question is - i would like to do sum of 'volume' column
    Current Output     
    ENVIRONMENT     Volume
    Production              79
    QA                 66
    Development     30
    Desired Output     
    ENVIRONMENT     Volume
    Production                     79
    QA                     66
    Development     30
    *Total                    175*
    select * from (
    select ci.environment, count(1) "Volume"          
    from tsgdw_task@awhsncp1 t,
               tsgdw_operational_process@awhsncp1 op,
               tsgdw_support_group@awhsncp1 sg,
               tsgdw_person@awhsncp1 p,
               tsgdw_configuration_item@awhsncp1  ci
    where sg.SUPPORT_GROUP_SEQ_ID in (SELECT sg2.SUPPORT_GROUP_SEQ_ID  FROM  tsgdw_support_group@awhsncp1 sg2
                             start with sg2.SEARCH_CODE = 'DBNONEC' --p_target_name
                             connect by prior sg2.SUPPORT_GROUP_SEQ_ID=sg2. PARENT_SUPPORT_GROUP_SEQ_ID)
            and t.task_seq_id = op.task_seq_id
            and sg.support_group_seq_id = op.support_group_seq_id
            and op.assigned_person_seq_id = p.person_seq_id
            and op.open_CONFIG_ITEM_SEQ_ID = ci.CONFIGURATION_ITEM_SEQ_ID
            and t.task_type = 'Change Task'
            and t.state = 'Closed'
            --and sg.search_code = p_target_name
            and ci.environment in ('Production','Development','Staging','QA')
    and OP.EST_ACTUAL_END_DATETIME between to_date('01-Apr-2012,00:00:00','DD-Mon-YYYY,HH24:MI:SS') and to_date('08-Apr-2012,23:59:59','DD-Mon-YYYY,HH24:MI:SS')      
            --and t.LAST_UPDATE_DATE between ??EMIP_BIND_START_DATE?? and ??EMIP_BIND_END_DATE??
    group by ci.environment
    order by 2 desc)
    where rownum < 6;

    user546629 wrote:
    Hi Vivek,
    How can I name the column name heading as "Environment" or "Category"
    NVL(CI.ENVIRONMENT,'TOTAL')     Volume
    Development 37
    QA     100
    Production     149
    Total     286
    RegardsUse Column Alias the same way you have done for count(1):
    select nvl(ci.environment,'Total') "Environment" , count(1) "Volume" http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_10002.htm#i2080424

  • How to filter a table according to column values in CRM2007 WebUI ie ICWC.

    Hi,
    I am working in CRM 2007 ICWC.
    My question is I need to filter the sales items table according to quantity entered in the sales order.How do I do it.I cannot use Filter = 'server' as it is obsolete in CHTMLB:Tableview tag.
    Please suggest a solution.
    Thanks,
    Ashish.

    Hi Ashish,
    I think you have to manually iterate the collection and filter them according to the value of quantity in each line.
    Regards, Sudeep..

  • How to re-calculate a column value based on another column value in the same ADF Table row

    Hi,
    I'm using Jdeveloper 11.1.2.3.0.
    I have an adf table with 2 columns, columnA and columnB.
    When the value changed in ColumnA,
    1) i need to call a PLSQL and update the ColumnB value that is returned from PLSQL.
    2) Show a warning message if the existing value in ColumnB is different from the one that is returned from PLSQL.
    Can anybody suggest how can i accomplish this?
    Thanks,
    Vinod

    hi user,
    if you have inputtext means have a valuechangelistener
    in that call your pl/sql function supply input value to the appropriate function then grab the result of the function. then bind the column inputtext and compare with it. then raise your warning using FacesMessage classes.
    Sameh Nassar: Create PL/SQL Function And Call It From Your ADF Application

  • I want to read and assign value of ADF Table rows  with Java Script

    Hi,
    I want to read and assign value of ADF Table rows with Java Script, but I cant true index of current row , so I assign wrong value to anathor column of ADF Table.
    My Code;
    ADF Table items
    <af:column sortProperty="Adet" sortable="false"
    headerText="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.labels.Adet}"
    binding="#{backing_ucret.column2}" id="column2">
    <af:inputText value="#{row.Adet}"
    required="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.attrDefs.Adet.mandatory}"
    columns="10"
    binding="#{backing_ucret.inputText2}"
    id="inputText2" onchange="getTutar('#{bindings.voHarcamaOdeme1Iterator.rangeStart + bindings.voHarcamaOdeme1Iterator.currentRowIndexInRange + 1}','#{bindings.voHarcamaOdeme1Iterator.estimatedRowCount}','#{row.index}')">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.formats.Adet}"/>
    </af:inputText>
    </af:column>
    MY JAVA SCRIPT CODE
    <f:verbatim>
    <script language="javascript" type="text/javascript">
    function getTutar(rowkey,totalrow,currentRow){
    alert('rowkey--totalRow--currentRow-->'+rowkey+'--'+totalrow+'--'+currentRow);
    if (currentRow==0) {
    rowkey=totalrow-1;
    }else{
    var rw=totalrow-currentRow-1;
    rowkey=rw;
    alert(document.getElementById('form1:table1:'+rowkey+':inputText8').value);
    alert(document.getElementById('form1:table1:'+currentRow+':inputText8').value);
    var birim_ucret=document.getElementById('form1:table1:'+rowkey+':inputText8').value;
    var adet=document.getElementById('form1:table1:'+rowkey+':inputText2').value;
    document.getElementById('form1:table1:'+rowkey+':inputText3').value=birim_ucret*adet;
    document.getElementById('form1:inputText6').value=0;
    var t;
    var toplam=0;
    alert('before Sum');
    for (var i=0;i!=totalrow-1;i++){
    t = document.getElementById('form1:table1:'+i+':inputText3');
    toplam+=t.value*1;
    document.getElementById('form1:inputText6').value=toplam;
    </script>
    </f:verbatim>

    You can achieve the use case you describe with partial page rendering (PPR), a feature of the ADF Faces framework. Here are a few posts that achieve an interactive behavior using PPR. Off the top of my head I do not know of an exact example, but this should be a good starting point:
    http://thepeninsulasedge.com/blog/2006/09/12/adf-faces-aftableselectmany/
    http://thepeninsulasedge.com/blog/2006/08/31/adf-faces-working-with-aftableselectone-and-the-dialog-framework/
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • DEPLOYMENT OF CRYSTAL REPORT IN SAP B1

    Dear sir I want to deploy my crystal  report in to sap b1 ant want that onle permited user can see that please help me Regards Anand Kmar Pandey

  • BPM integration with BRM step by step

    Hi All, I am looking for a blog for complete scenario which includes business rules used in BPM,that is ,complete STEP BY STEP blog for BPM integration with BRM.Searched a lot but finding either BPM or BRM or BRM already created without mentioning st

  • Isight problem with windows

    hi i have a serious problem with my isight... i installed win xp using the boot camp,after 1 month the isight is stopped working and i found under the device manager "DFU Loader" i did the SMC and PRAM,it works maybe for 2 or 3 days then the same pro

  • Set Form Value and Submit Via Applet

    Hi Friends, suppose you have a form such as: <form action="submit.jsp" method="post" name = emailForm> <input type="text" name="emailField" size = 43> </form>And an applet appears on the same JSP page that the form resides. This applet is a simple on

  • Are there static methods in TOOL

    Do static or class methods exist in TOOL? If they do, I would appreciate a pointer to the documentation. If they don't exist, what is best practice for creating utility or helper methods for things like string operations, getting random numbers withi