Current record issue

Hi,
I have a data block in tabular format, displaying 10 records at a time with a scrollbar. There is a checkbox for each record. When the checkbox is checked/unchecked, I have to populate a summary field by looping through all the records including/excluding the record which was checked/unchecked. After this is done, I want the cursor to remain in the same record. Since i am using NEXT_RECORD to loop through all the records, the cursor comes to the last record. Then i used CURRENT_RECORD property to store the current record value and I reset the property after the looping is done. Now the cursor remains in the same record, but that record becomes the first record in the canvas meaning that the record scrolls upwards. How can we avoid this ? I want the canvas to remain in the same position as it was before checking/unchecking.
Regards,
Suresh

First of all, you don't have to loop over a block to sum something. That's what calculated items are for. Create a calulated item of type formula with something like the following as formula
CASE WHEN :BLOCK.CHECKBOX='J' THEN :BLOCK.VALUE ELSE 0 ENDCreate another calculated item of type summary which sums up the formerly created item.
If you still want to loop:
-Remember SYSTEM.CURSOR_ITEM before starting
-Remember GET_BLOCK_PROPERTY('BLOCK', TOPMOST_RECORD)
-After finished, do a GO_RECORD(<theFormelryRememberedSYSTEM.CURSOR_ITEM);
-Loop as long as GET_BLOCK_PROPERTY('BLOCK', TOPMOST_RECORD) is smaller then the remembered value and do a NEXT_RECORD;

Similar Messages

  • Task flow return-Current Record pointing issue.

    Hi friends
    Newbie in ADF (basically from .net back ground)...........I am in the process of developing my first module.
    I have a task flow where a master detail records are displayed ..When I click "Edit" it is calling a edit task flow where the editing of master/detail tables are performed .When I click "New" a blank record is created and it is calling same edit task flow.
    my problem is when the child task flow exits and returns to the parent it is not pointing to the current record I edited...This is true if return either by commit or cancel.
    My data control is shared , parent task flow does not have any transaction and child always starts a new transaction.
    What is the ideal solution to point to the current record when I return?.
    Thanks .
    Ashraf

    Below is updated bean code
    ViewObject VO;
    FacesContext fctx = FacesContext.getCurrentInstance();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iter = bindings.findIteratorBinding("Delmast1Iterator");
    VO = iter.getViewObject();
    Key currKey = iter.getCurrentRow().getKey();
    Row[] rows = VO.findByKey(currKey, 1);
    if (rows.length == 1) {
    System.out.println("row found");
    VO.setCurrentRow(rows[0]);
    iter.executeQuery();
    iter.setCurrentRowWithKey(currKey.toStringFormat(true));
    iter.setCurrentRowWithKeyValue(iter.getCurrentRow().getAttribute("SaleId").toString());
    If my child task flow does not have a commit or rollback the above code works fine...But I am beginning a transaction in my child flow(edit flow) so it is a must to have commit/rollback.
    Is there any other options experts ?..Please guide me.
    Thax.

  • No field in current record - message

    Access2007.accd of an old db built circa 90s .mdb; 
    Main form, with single form Sub form2, with continuous Sub form3
    Main form has a Combobox1 to select record from Table 1
    Sub form2 has a Combobox2 in its header to select record from Table 2 (Many to Table 1 key)
    Combobox2's record set is a query with criteria of Main form Key ID so it only displays choices valid to Main form 
    continuous Sub form3 displays records from Table 3 (Many to Table 2 key)
    and this all works fine
    when Main form's combobox1 is changed, subform 2 is requeried and combobox 2 requires an explicit requery in the combobox 1 AfterUpdate Event
    this also works fine - except - if one has highlighted a row in continuous sub form 3, and then using your cursor to go to Main form combobox 1 and select ; then the error message 'No combobox2 is in the current record' appears
    so I am guessing the 'current record' is the issue but not sure how to resolve.......

    All that I can add to this is:
    clicking in a row/field in continuous sub form 3 causes the problem as per the first post
    if one clicks into single Sub Form 2 before triggering the Main combo box - everything works ok
    because the error is saying 'there is no such field in the current record'....and the Go To step of the macro is to a control and not a field - it is a baffling error to me.  But to satisfy this insanity I created a calculated field in the query record
    source of continuous sub form 3 using the name of the control and just entering a fixed 'dummy' value....
    and that works.... a bizarre work around.......

  • Updating current record using SET_CUSTOM_PROPERTY in a multi-record form

    Hi,
    I have a multi record form and am using the SET_CUSTOM_PROPERTY method in the when validate trigger of an item. The problem is that it updates all records in the form instead of updating just the current record.
    Any inputs to resolve this would be helpful.
    Thanks

    I cannot reproduce the issue here.
    I have modified the sample dialog shipped with th article to have a block that displays 2 records
    <p>See the screenshot here</p>
    Here is the code in the When-Button-Pressed trigger:
      Set_Custom_Property( 'BLZ.BEAN', 1, 'READIMGFILE', 'd:/coyote.jpg' ) ;
      Set_Custom_Property( 'BLZ.BEAN', 2, 'READIMGFILE', 'd:/oracle_community.gif' ) ;So everything is ok for me.
    Francois

  • Keeping current record after refreshing iterator (iterator refresh)

    Greetings,
    I'm using the following code to refresh a master iterator, so that when data is saved\edited it is automatically refreshed in the user interface. I'm using BC for the model layer.
    public String commandButton_save_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Commit");
    OperationBinding operationBinding2 =
    bindings.getOperationBinding("Execute");
    System.out.println("Now @ Global bean ... going to ...");
    operationBinding.execute();
    operationBinding2.execute();
    // It should be a error page
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    // Refresh main view object
    DCBindingContainer bc =
    (DCBindingContainer)FacesContext.getCurrentInstance().getExternalContext().getRe
    questMap().get("bindings");
    FirstCareAppModuleImpl fc =
    (FirstCareAppModuleImpl)bc.findDataControl("FirstCareAppModuleDataControl").getD
    ataProvider();
    ViewObject vo_SitSocProf = fc.findViewObject("EpisodiosMain");
    vo_SitSocProf.executeQuery();
    System.out.println(" All done. Ciao ");
    return "back";
    I just want to refresh data from database and still show the current record. This is always taking me to the first record in the iterator.
    The issue is: How to show the current record after the refresh? If the above
    code is not correct, or not the most adequate, please don't hesitate and tell
    me.
    Thanks.

    You can do this as follow:
    1) In your ApplicationModule (e.g ScottAM) define function:
    public void refreshView(){
    getMainViewObject().executeQuery();
    2) Expose this function to client
    3) In your manage bean define:
    public String commandButton_save_action() {
    String dc = "#{data.ScottAMDataControl.dataProvider}";
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding vb = ctx.getApplication().createValueBinding(dc);
    ScottAM am = (ScottAM)vb.getValue(ctx);
    am.refreshView()
    return null;
    Note, that this solution will set you on the first row after invoke.

  • FRM-41344 - OLE object not defined  for CONTROL_OLE  in the current record

    Hi!
    I am working in a multirecord block, and I need to obtain data from a Weighing System on each record. But this error appears in run time: FRM-41344 - OLE object not defined for CONTROL_OLE in the current record.
    I use the same in other program, but in that case is a single record block.
    Can somebody help me?

    Hi;
    For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which is dedicated forum site
    Regard
    Helios

  • Checking Previous record with current record.

    I have a small problem, i want to compare the previous record with the current record with in cursor declared....
    Please help in this issue.
    Thanks in advance.

    Try the lag analytic function.
    select some_value, lag(some_value) over (order by your_ordering_condition) from x order by your_ordering_condition

  • Control record issue !

    Hi All,
    I am handling UK Payroll and got an issues related to payroll run and control record,
    Issue 1: The payroll driver (RPCALCG0) has skipped around 1500 Employees against payroll run for particular period
    Issue 2: How control record allowed user to Exit control record for period in which EE's skipped in payroll
    Please provide your valuable suggesting in regard to resolve the above two issues,
    Thanks in advance.
    Regards,
    Devendra Reddy D.

    Hi,
    Issue 1: The payroll driver (RPCALCG0) has skipped around 1500 Employees against payroll run for particular period
    Say you want to run payroll for FEB..
    But payroll control record may not be in FEB... It may be in March..
    Issue 2: How control record allowed user to Exit control record for period in which EE's skipped in payroll
    Payroll control record may have been deleted on the month of Jan..& been set in Release mode in March month directly...
    So feb month gets skipped & Exit mode in Feb is skipped too...
    For detailed info.. Go to PA03 enter payroll ares & click display option..
    Under Go To tab.. look for Control Record Log..
    Regards,
    Veeram

  • No Current Record Error When Opening Project

    So, I have a large-ish project that I've been working with for a while in RoboHelp 9. Said project has historically been somewhat unstable (we had to strip it down and rebuild it entirely a couple years ago), and today said instability has reared its ugly head. Essentially, when I try to open the project, RoboHelp spins its wheels for a while, and eventually gives me a message reading "No current record." I got this error trying to open the XPJ file, then tried the HHP, which apparently blew the XPJ away, and gave me the same message.
    I have a backup project I can use if need be, but I'd rather get my original version running again. Any ideas?

    You haven't said whether you tried deleting the CPD?
    Also you haven't said where the project is located, network or local.
    See if this thread helps and post back.
    http://forums.adobe.com/message/244585#244585
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to Highlight the CURRENT RECORD in a Table with Report Form

    Hi,
    I have created a Table with Report Form....let suppose the table is - EMP
    Report page - 1
    Form page - 2
    Now, when I do Create / Update on Page 2,....the control is back on Page1.
    Suppose in the Report Page (Page1)..we have 10 records....NOW how should I highlight the CURRENT RECORD in Page 1 with some color to identify the record which I have updated/created just now...
    Thanks,
    Deepak

    Hi Deepak,
    You could do that with a custom report template. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:175]
    Go to Shared Components, Templates and create a new Report template as a copy of your existing one. Then edit your template. In the above example, the Column Template 1 setting was:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;I copied this into the Column Template 2 setting and updated the Column Template 1 setting to:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red; color:yellow;"&gt;#COLUMN_VALUE#&lt;/td&gt;I then set the Column Template 1 Condition to: Use Based on PL/SQL Expression
    and the Column Template 1 Expression to: '#EMPNO#' = '&P178_EMPNO.'
    (In my example, P178_EMPNO is the single item on the linked to page.
    Save those changes and go to your report and change its template to the new one. As long as a selection has been made and P178_EMPNO has a value, the condition will make sure that the report uses the first template for the row with the matching EMPNO value. All other rows get the template from Column Template 2.
    Andy

  • Re: Displaying Current Record After Delete

    Hi all,
    I am using Jdeveloper 11.1.2.3.0
    I have two tables which has parent child relation among the both.
    I dragged the parent table as a adf form on to the .jspx page.
    Now if i am trying to delete fifth record in the parent table it is giving error message like "Table has child record, delete unsuccessful"
    It is fine, but the control going to first record after deletion.
    But i want to display current deleting record on the page if deletion is unsuccessful.
    Can anybody help me to resolve the above one.
    Thanks,
    Syam

    In this code when the bolded if condition fails i want to delete that record. I tried "delete struct1 index sy-tabix" but that record is not deleted.
    I tried "clear  struct1 ". its deletes the current record.
    but in some field its getting zero value & it is appending as a additional record.
    Please help me.
    loop at cdhdr.
    if ( it1-tcode = 'FSS0' or it1-tcode = 'FS00' ).
        w1_saknr = it1-objectid+4(10).
        w_orgid = it1-objectid+14(4).
       loop at it_cdpos  where changenr eq it1-changenr
                      and objectid eq it1-objectid
                       and   objectclas eq it1-objectclas.
       <b>If w_orgid in r_orgid.</b> 
      IF ( it_CDPOS-FNAME = 'XLOEV' AND it_cdpos-value_new eq 'X' ).
         replace struct1-change_ind with 'D' into struct1-change_ind.
                struct1-bukrs = w_orgid.
                struct1-cost = space.
                struct1-plant = space.
                append struct1.
          else.
             struct1-bukrs = w_orgid.
             struct1-change_ind = w_chngid.
             struct1-cost = space.
             struct1-plant = space.
             append struct1.
          endif.
       <b> else</b>.
        <b>delete struct1 index sy-tabix</b>.
      endif.
        append struct1.
           endloop.
    endif.
    endloop.

  • Set current record to uppercase

    Hi,
    How can i set a particular item in the current record to uppercase at runtime.
    Set_item_property is setting the item
    in all the records to uppercase.
    Thanks in advance.
    Phebe

    If you just want the value to be in upper case you can code a trigger to do this for you in when-validate-item or post-change.
    Just do it manually without a builtin .

  • Current Record Visual Attribute

    Hallo,
    In a Dev.2.1 Form I have defined a Visual attribute (VA01 - black on yellow) and then in a Data Base block I have assigned VA01 to the 'current record' property.
    One item of that block is not a Data Base one. When I scroll the rows of the Base Table only this item isn't affected by the current record visual attribute, i.e. it remains "black on white".
    Anyone kwnows why ?
    Thanks in advance.
    Dino.

    The 'Current record Visual attribute' property of that block is already set to VA01. The point is that all of the items of that block iherit the attribute, except the one I said, which doesn't belong to the base table. I ask if this behaviour is normal, and how to do to have also this item to be affected by the same visual attribute !
    Thanks.

  • Whenever I try to download the Edge Animate tutorials it says currently having issues ant to contact customer support

    Whenever I try to download the Edge Animate tutorials it says currently having issues ant to contact customer support

    Hi,
    Now sure from where you are downloading edge animate tutorials. Can you please post any link or screenshots?
    If it is within browser then..
    1. Try in different browser.
    2. Clear the browser cache.
    Regards,
    Devendra

  • APP-PAY-07092: This action is invalid for the current record.

    Unable to access employees assignment panel in order to make updates within oracle HR receiving this error.How to fix this.

    Please see these docs.
    APP-PAY-07092 This action is invalid for the current record when Trying to Access Assignment [ID 813815.1]
    PERWSHRG APP-PAY-07092 when Navigating to Assignments Screen [ID 796523.1]
    PERWSHRG APP-PAY-07092 Trying to Access Assignment [ID 1434212.1]
    PERWSEAC Cannot enter Costing for Contingent Workers APP-PAY-07092 [ID 1458000.1]
    App-Pay-07092:Action Invalid for Current Record:Salary for Active Contingent Asg [ID 360168.1]
    Payment Method Errors When Opened: APP-PAY-07092: This process is invalid for the current record. [ID 289691.1
    Thanks,
    Hussein                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • [Contest] Total War: Attlia Daily Quiz!

    Gamers! it's the time to show your gaming spirit and knowledge!! Answer the quiz of day to win the free MSI A88XM GAMING Motherboard, Tt eSPORTS Gaming Gears, and Total War: Attlia Game Code! ***Date*** 2015/04/27 - 2015/05/11 Quiz Platform:MSI Twitt

  • Two VGA monitors don't work with two different G4s, but both work with G3!

    I recently acquired two used Power Mac G4s (one of them is a mirrored-door dual-processor that I got from school and was told should work, the other is a Gigabit Ethernet model, and should also work), from two completely different sources. They both

  • Check for updates not working in 9 pro

    I am running Acrobat 9 pro on a Vista machine. Acrobat appears to have been malfunctioning (bates numbering is not working properly), and I uninstalled (and deactivated) Acrobat, and then reinstalled it. After reinstallation, I used the check for upd

  • How Do I Watch Movies (Stored On iPod) On My TV?

    I have a movie on my iPod that I want to watch on my TV. What do I need to do? Do I need a special wire? If so, where do I plug it into the iPod and where do I plug it into my TV?

  • Help on pivoting in oracle 11g

    Hello, I trying build a dynamic report with unlimited rows and columns. So I have 3 tables. The first table has report names mean while the second and the third tables have rows and columns information respectively. -- table for report reportid repor