Get Total of a Column of Advanced Table and use it in Controller in OAF

I have an advanced table on my custom page. I am calculating total of a column in my footer. I am acheiving this using the standard functionality of advanced table by setting total value property of my column to "TRUE" and displaying the total in the tablefooter components.
In addition to this I want to retreive the total value from my footer and use it in my Controller for further validations but I am not able to acheive this.
I tried some code already present in the Community for the same but nothing turned out right for me.
Can anyone please help me on this.

   Hi there ,
  You can manually add the values of each row of a  column and make use of the value obtained in your controller .
Here is the logic ,
1) get the vo instnace attached to that table .
2) Loop through every single row in the table .
3) get the value and sum up the value and use it in your controller .
int fetchRowCount = vo.getFetchRowCount();  
voRowImpl row = null;  
int count =0;
if (fetchRowCount  > 0) { 
RowSetIterator iter = vo.createRowSetIterator("Iter"); 
iter.setRangeStart(0);
  iter.setRangeSize(fetchBidderRowCount);
   for (int i = 0; i < fetchBidderRowCount; i++) {
  row = voRowImpl iter.getRowAtRangeIndex(i);
   //use RowImpl getters   10.   
         Number personId = row.getPersonId();
count =personId+count;         // add each and every value and have in variable
iter.closeRowSetIterator();
Regards ,
Keerthi

Similar Messages

  • Adding a column in advanced table using personalizations

    Is it possible to add a column in advanced table using personalizations.
    If Yes , then i am not able get "Create Item" Icon on Advanced table Level personalizations . Can some one give reason? or there is any other way to create Item in Adavnce table.
    Thanks, Avaneesh

    The support for adding an item in advancedTable is supported from 11.5.10 CU3 onwards. But you can manually add an item in the personalization document and upload it and that should work. I had earlier provided the xml tags for doing that in one of threads and you should be able to find that in the forum. If you are not getting it I will search it for you. We supported the same way of addition using personalization in CU3 so manual addition in to the pers document should be fine for this requirement only.

  • How to set the flexfield column in advanced table

    Dear All
    Dear Gaurav
    Good morning
    iis it posible to create a flexfield column in advanced table.I am trying it is showing some error......
    Thanks& Regards
    Sreekanth

    Hi,
    My doubt is compulsory we give the view instance for flex field,
    and also give the view instance for advanced table.
    when i created the flex field in advanced table,it didn't ask the view instance.
    the advanced table and flex field view instance are different
    at that how can i create the flex field in advanced table.

  • How to change color of column in advanced table

    Hi Guys
    I need to change the color of column in advanced table.
    Please help me .
    Thanks
    Subramanian

    Hi
    Can you please give the sample code for this
    I created advancedtable
    under this advancedtable , I created columngroup
    under this columngroup
    I created column1 and column2
    Here I need change the color for entire column1.
    Thanks
    Subra

  • Background color change of a column in Advance table

    Hi,
    We have requirement to change the background color of column in advance table based on some condition. We tried putting code to change background color in Custom.xss using background-color property and setting newly created css dynamically based on condition but it seems it only changes the background color of text not the complete cell. We want to change the color of complete cell in an advance table.
    Please let me know if there is any other way I can achieve this requirement. Any help would be highly appreciated.
    Thanks

    <FONT FACE="Arial" size=2 color="2D0000">
    Pls look into "Alter Table"section.
    LOB_storage_clause
    This might help
    -SK
    </FONT>

  • How to set color for a particular column in advance table?

    How can we set the color of a particular column in advance table based on some parameter feteched from vo query in process request?

    i have tried the same way as mentioned in the post but ,its giving error
    java.lang.ArrayIndexOutOfBoundsException: 0
    processRequest code
    OAAdvancedTableBean table =
    (OAAdvancedTableBean)webBean.findIndexedChildRecursive("TimEntAdvtbl");
    if (table != null)
    System.out.println("table");
    OAColumnGroupBean daily =
    (OAColumnGroupBean)table.findIndexedChildRecursive("DailyColGrp");
    if (daily != null)
    System.out.println("daily col");
    OAColumnGroupBean ColGrp6 =
    (OAColumnGroupBean)table.findIndexedChildRecursive("ColGrp6");
    if (ColGrp6 != null)
    System.out.println("ColGrp6");
    OAColumnBean SatCol =
    (OAColumnBean)webBean.findIndexedChildRecursive("SatCol");
    if (SatCol != null)
    System.out.println("col");
    OAMessageTextInputBean sat1 =
    (OAMessageTextInputBean)SatCol.findIndexedChildRecursive("sat");
    if (sat1 != null)
    System.out.println("sat1");
    OADataBoundValueViewObject csssat= new OADataBoundValueViewObject(sat1,"Color");
    sat1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, csssat);
    Error Page
    ## Detail 0 ##
    java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3199)
         at oracle.sql.NUMBER.toString(NUMBER.java:761)
         at oracle.sql.NUMBER.stringValue(NUMBER.java:2090)
         at oracle.jbo.domain.Number.toString(Number.java:390)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.formatObject(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean.getAttributeValueImpl(Unknown Source)
         at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    Please help

  • How can I get data in flat file from Pool table and cluster table ?

    Hi,
    I am working in one Achiving project. My requirement is to get data into flat file from Cluster table and pool table.
    Is there any tool avilable to download data into flat file from pool table and cluster table ?
    if table name given in the selection screen then data will be downloaded into flat file.
    waiting for quick response.
    Best Regards,
    Bansidhar

    Data cannot be retrived directly form the cluster table
    as the Cluster results are stored in Cluster Key say for example PCLkey
    and form that Key we need to fetch the data
    these clustes are not the part of PNP or PNPCE tables
    for ur info kindly check

  • OAF :I need to show totals for columns that breaks on one of the column in Advance Table

    I am using advance table (AT),
    I have a requirement to calculate totals for few columns in the AT, based on the account number ( totals should break on the account # , as shown below )
    Please help.
    Account
    Desc
    Paid Amt
    AP Credit
    acc1
    desc1
    200
    100
    acc1
    desc1
    300
    100
    acc1
    desc1
    400
    100
    Total 900
    Total 300
    acc2
    desc2
    150
    50
    acc2
    desc2
    250
    50
    acc2
    desc2
    100
    150
    Total 500
    Total 200
    Message was edited by: 85de445e-a75a-4f2f-b086-8cb6abb09c5d
    CAN ANY ONE PLEASE PROVIDE ANY INPUTS.. , AS ITS URGENT ! Thanks in advance.

    Any updates on this please !!! ?
    Please suggest if this can be achieved by any other region type or any specific type to be used ??

  • Joining three tables to get totals on three columns.

    hi gurus,
    i have spent hours and hours to get the desired result with this join query. 98% of the query bring results according to my expectations but for some reasons few results are duplicating. let me give you the structure of my tables than my query and than what i expect it to bring. here we go;
    There are three tables
    *1. SENDER*
    Name Null? Type
    SNAME VARCHAR2(50)
    SPHONE1 NOT NULL VARCHAR2(15)
    SPHONE2 VARCHAR2(15)
    SPHONE3 VARCHAR2(15)
    SCITY VARCHAR2(25)
    SREMARKS VARCHAR2(200)
    IDENTIFICATION VARCHAR2(20)
    ADD1 VARCHAR2(30)
    ADD2 VARCHAR2(30)
    *2. TRANSACTION*
    Name Null? Type
    T_ID NOT NULL NUMBER
    SPHONE1 VARCHAR2(15)
    R_ID NUMBER
    RB_ID VARCHAR2(10)
    TRANSFER_TO VARCHAR2(25)
    TDATE DATE
    SOURCE VARCHAR2(20)
    CURR VARCHAR2(10)
    PAID VARCHAR2(10)
    MOP VARCHAR2(10)
    DOLLAR NUMBER
    RATE NUMBER(5,2)
    RUPPEE NUMBER
    TREM1 VARCHAR2(200)
    TREM2 VARCHAR2(100)
    PPAYMENT VARCHAR2(10)
    PROMISE VARCHAR2(50)
    BALANCE NUMBER
    DOLLAR2 NUMBER
    *3. PAYMENTS*
    Name Null? Type
    PAYMENT_ID NOT NULL NUMBER
    PDATE DATE
    SPHONE1 VARCHAR2(15)
    AMT_PAID NUMBER
    BALANCE NUMBER
    T_ID NUMBER
    QUERY_
    select a.sname, a.sphone1, nvl(sum(b.dollar),0) ORD, nvl(sum(b.dollar2),0) ADV,
    nvl(sum(c.amt_paid),0) Paid
    from sender a, transaction b, payments c
    where a.sphone1 = b.sphone1
    and b.t_id = c.t_id(+)
    and b.paid in ('N','B')
    group by a.sname, a.sphone1
    order by 1
    HERE IS THE RESULT OF THIS QUERY:_
    SNAME SPHONE1 ORD ADV PAID
    Muhammad Atif Ishtiaq 778 889 7195 2150 635 45
    BRIEF DESCRIPTION:*
    We have sender info in SENDER table, when they place order it goes to TRANSACTION table and when they pay it goes into PAYMENTS. some times they make payments in installment of a single order. which i record them in payments with their T_ID (Transaction ID) and this is the problem what i research until now. many customers place multiple orders over a period of time but dont pay and some times pay the orders in installment. i just want to present the whole story in one single row, as i mentioned above under query result. in this example the actual ORD suppose to be $2050 instead and ADV $605. PAID is OK.
    SQL> select t_id, dollar, dollar2 from transaction where paid = 'B' and sphone1 = '778 889 7195';
    T_ID DOLLAR DOLLAR2
    18274 450
    18278 1000 500
    18263 100 30
    18265 100
    18266 100
    18268 100 25
    18269 200 50
    SQL> select t_id, amt_paid from payments
    where t_id in (select t_id from transaction
    where paid = 'B' and sphone1 = '778 889 7195')
    T_ID AMT_PAID
    18263 20
    18263 25
    AND in the end i would like to calculate balance of the columns ((ORD+ADV) - (PAID))
    Any help would be appreciated.
    best regards.
    NOTE: i am running oracle 8 and developer 6i

    try this:
    WITH TRANSACTION AS (select 18274 t_id, 450 dollar, NULL dollar2, '778 889 7195' sphone1 FROM DUAL
                         UNION ALL
                         select 18278 t_id, 1000 dollar, 500 dollar2, '778 889 7195' sphone1 FROM DUAL
                         UNION ALL
                         select 18263 t_id, 100 dollar, 30 dollar2, '778 889 7195' sphone1 FROM DUAL
                         UNION ALL
                         select 18265 t_id, 100 dollar, NULL dollar2, '778 889 7195' sphone1 FROM DUAL
                         UNION ALL
                         select 18266 t_id, 100 dollar, NULL dollar2, '778 889 7195' sphone1 FROM DUAL
                         UNION ALL
                         select 18268 t_id, 100 dollar, 25 dollar2, '778 889 7195' sphone1 FROM DUAL
                         UNION ALL
                         select 18269 t_id, 200 dollar, 50 dollar2, '778 889 7195' sphone1 FROM DUAL
         PAYMENTS AS    (select 18263 t_id, 20 amt_paid FROM DUAL
                         UNION ALL
                         select 18263 t_id, 25 amt_paid FROM DUAL
         SENDER AS      (SELECT 'Muhammad Atif Ishtiaq' SNAME, '778 889 7195' SPHONE1 FROM DUAL
    select a.sname,
           a.sphone1,
           nvl(ORD,0) ORD,
           nvl(ADV,0) ADV,
           nvl(amt_paid,0) Paid
      from sender a,
           (SELECT sphone1,
                   sum(dollar) ord,
                   sum(dollar2) adv
              from transaction b
            GROUP BY sphone1) b,
           (SELECT sphone1,
                   SUM(amt_paid) amt_paid
              FROM payments p,
                   transaction t
             where p.t_id=t.t_id
             GROUP BY sphone1) c
    where a.sphone1 = b.sphone1
    and b.sphone1=c.sphone1(+);

  • How to get the selected rows & columns in the table?

    hi everybody,
                         In my application the table is kept inside the event structure.I select the cells  in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?

    Hello,
    You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings.  I think for your "disable" question you are referring to the shortcut menu (when you right click).  If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How to get control on each row in advance table

    hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
    for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
    if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
    onetime.setSelected(true);
    recurring.setSelected(false);
    else
    onetime.setSelected(false);
    recurring.setSelected(true);
    but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....

    Babu,
    Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Adding a Column in Advance Table RN

    Hi,
    In a standard page, there is a searchRN and based on that, the data in the advance table gets populated. I want to add another column to this advance table. The VO has the required column, so I have to just map the attribute and instance.
    If it was not a advance table, I would have done , but for Advance table it looks different. Any step by step approach would really help.
    Appl Version : 12.1.3
    Thanks

    Thanks.
    It works for base columns, but I am facing an issue with attributes.
    In the VO query, we have:
    seLect x1,x2,x3,attribute1,attribute2 from TABLE
    in VO attribute (of the new item) when I pass say x2, it works, but the moment I pass attribute1, it errors out. The error being, cannot find 'attribute1' in xyzVO. Wondering, if to map the attributes, we need to do some other steps?
    Thanks
    Edited by: 970046 on Dec 3, 2012 10:11 PM

  • How to display fixed width column in Advanced Table?

    Hi,
    This is probably a newbie question for OAF. My requirement is quite simple but I couldn't find the answer in either the OAF developer's guide or anywhere else so I turn to the experts here. I have a region of type Table or Advanced table with three items in them. One of the Item is of type comments which could be up to 4000 characters.
    I wanted to show all three on the first page but only have fixed width for the comments section like only show the first 50 characters for example and then if they want to see more detail they can click on a link to see full comments.
    The problem is I cannot figure out how to make the comments item fixed width. I have played with the table width properties but it keeps displaying the comments in multiple lines (I don't want that...). I have also tried putting the Table in a Row Layout but it doesn't seem to help.
    Since this is new development I can change my region style to anything to meet my requirements.
    I hope this is an easy question and if someone can help me that would be great....:-)

    Hi,
    Thanks but I was not wanting to change the VO attribute length size since I want to have a link on the first page which would enable to see a user the full 4000 comments using the same VO object. Then if I limit it to 50 characters in the VO, I will not be able to display the full comments on the second page.
    Isn't there some way in the UI that I can limit it? I know one workaround I can use for now is to have another column in the VO with the 50 character value such as substr(comments, 1, 50) and then have the full comments selected also in the VO and then show this subtr value in the first page and the comments value in the 2nd. I just thought there would be an easier way about it then doing all this workaround.
    Any ideas?
    Thanks

  • Problem with sorting a Column in Advance table .

    Dear Friends ,
    I have a OAF page developed with advanced table region , the table has several columns, now i would
    like to sort a column named "Trial number" which is of the type Number .
    To accomplish this i have given Sort Allowed : True (Property Inspector) . but when i click on the sort button
    i am unable to sort the record . Could you please some one give me some suggestion and help me out .
    Regards,
    Keerthi.k

    No there is no Transient attribute involved , could you please tell me what might cause this error .
    Basically this page is for inserting a record.
    Thanks ,
    Keerthi
    Edited by: user1140193 on Oct 21, 2011 7:15 AM
    Edited by: user1140193 on Oct 21, 2011 7:16 AM

  • How to disable a column in Advance Table

    Hi All,
    I have an advance table, for which one of the column is MessageTextInput I want to disable this column programatically on certain condition for a particular row, is this should be implemented by switcher else is there a better way.
    Thanks in advance

    switcher is the best way to implement this problem.
    You can also use SPEL expression, which is very easy to implement.
    Eg,
    Set the SPEL expression for readOnly property as ${ReadOnlyFlag} // where readOnlyflag is a boolean attribute in the VO of respective region.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for