Highlight the current row in the called form

hi,
how can i highlight the current selected row in the called form.. do i have to use current_record or current rowid as parameter and pass to a called form ??
thanks

i passed the current record as parameter to called form. so i have the current record number, say 2.. so can i not do the GO_RECORD('2'); after going to that particular block of the called form??

Similar Messages

  • Getting the current row as the DataGrid is created.

    I want to trap the first row of my DataGrid how can I do
    this?

    Amit, shame you didn't include a code example. The first blog does work...though probably not the most effecient mechanism. The 2nd Blog seems to be missing something as referencing e.site isn't enough. I've included a code sample of what it should be. Please include the routine DeleteNil as you can't assign a value to a null node. If theres a more effecient way..by all means post a blog. Cheers
    public void Items_UnitGross_Changed(object sender, XmlEventArgs e)
    // Check if value has changed and not a table insertion
    if (e.Operation == XmlOperation.ValueChange)
    // Get Current Row
    XPathNavigator xNavigator = e.Site;
    bool bParent = xNavigator.MoveToParent();
    // Get Reference to the Gross Value
    XPathNavigator xField = xNavigator.SelectSingleNode("boc:UnitGross", this.NamespaceManager);
    DeleteNil(xField);
    double dGross = Convert.ToDouble(xField.Value);
    // Get Reference and set the Net Value
    xField = xNavigator.SelectSingleNode("boc:UnitNet", this.NamespaceManager);
    DeleteNil(xField);
    xField.SetValue(getNet(dGross).ToString());
    public void DeleteNil(XPathNavigator node)
    if (node.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
    node.DeleteSelf();
    private double getNet(double Gross)
    // Calculates the Net Value (without Tax) from the Gross value
    double dNet = Gross / C_VATRATE_DIV;
    return dNet;

  • Create Row Next to the current row using the enter or tab key

    hi
    May my needs is not correct with web development, so in some pages like Journal Voucher Entery, the user need to add about more than 200 row, if there is any soluation to handle such status please send to me. the user ask not to press add or create button each time.
    thanks

    Hi,
    Excel has no direct feature or option to achieve your goal. We'd better try the macro via VBA code to test. Please see the thread:
    http://excel.tips.net/T003923_Automatically_Moving_from_Cell_to_Cell_when_Entering_Data.html
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    If you have further question about code, I recommend you follow with thread which you posted in MSDN forum:
    http://social.technet.microsoft.com/Forums/en-US/6f5344cf-c1b5-485d-982a-eeec45294f9b/ms-excel-move-automatically-without-pressing-enter-or-tab?forum=exceldev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Change the current row in an iterator and reflect the change on page

    Hi there,
    I have a jspx with a creation form created as usual draging and droping the data control. In same page, I inserted a commandButton which ActionListener executes a method in a managed bean called validate(). Through such a method what Im trying to do is to fill the form with data from specified entry of the database if certain condition is true. I know it is kinda twisted but unfortunately is the requirement for the page.
    So basically in "validate" method, if the condition I mentioned is reached, I do the following:
    // execute a Rollback (included in Page Definition) in order to cancel the previous auto-invoked "Create".
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    BindingContainer bindings =(BindingContainer)app.getVariableResolver().resolveVariable(context,"bindings");
    OperationBinding opBinding = bindings.getOperationBinding("Rollback");
    opBinding .execute();
    //get the iterator and asociated VO from the binding container
    ValueBinding vb = app.createValueBinding("#{bindings.AccountsVOIterator}");
    DCIteratorBinding dciter = (DCIteratorBinding) vb.getValue(FacesContext.getCurrentInstance());
    ViewObject view = dciter.getViewObject();
    //and set the current row with the specified entry I have mentioned above.
    Object keyValues[] = new Object[2];
    keyValues[0] = "1"; keyValues[1] = "98543";
    Row[] row = view.findByKey(new Key(keyValues),1);
    AccountsVpnVORowImpl client = (AccountsVpnVORowImpl)row[0];
    view.setCurrentRow(client);
    view.executeQuery();
    dciter.setCurrentRowWithKey(client.getKey().toStringFormat(true));
    dciter.executeQuery();
    opBinding = bindings.getOperationBinding("Execute");
    opBinding.execute();
    All this works perfectly when I debbug it but I cannot see the changes in the page(even refreshing browser). I need that when such a condition is met, the creation form turns into a modify-specific entry form, filling all fields with the specific data in order user can modify it, and all in the same page.
    Any clue?
    Thanks so much in advance for your time.

    Hi,
    I could see the problem with call to executeQuery and execute methods at the end of your method which re-sets the current row.
    Once you set the current row you should not call execute or executequery methods. Try removing those calls and also make sure that you have added partialTriggers property on the table is set to commandbutton id and partialSubmit property is set to true on commandButton to refresh the table partially on click of a button
    Sireesha

  • Getting the current row in a datatable

    Hi,
    I am using datatable. How do I get the current row in the datatable
    and use it for my processing in the JSP page
    or I want to just output that value with out using any jsf tags.
    Examples
    <h:dataTable styleClass="dataTable" id="table1" border="0"                    value="#{myTrainingHandler.myMediaTraining}" var="dataIt">
    <h:column id="column1">
    <f:facet name="header">
    <h:outputText styleClass="outputText" value="Course Name"id="text1"></h:outputText>
    </f:facet>
    <!---------------------------------------------- how do I get the value of #{dataIt.name} and use it in the JSP way
    Reason: I just want to output the value. If I am using h:outputText then it inserts <span>... </span>
    or, I want to transfer that value to another another attribute in the session or something like that.
    ---------------------!>
    <h:outputText styleClass="outputText" id="text2" value="#{dataIt.name}"></h:outputText>
    </h:column>
    </h:dataTable>
    -Aswath

    It looks like good idea!Unfortunately this is just workaround. Indeed your
    suggestion is real JSF-feeling solution but due to the
    bug (or rather pure design of RI implementation???) it
    is dangerous.
    I had some doubt about is it bug or my incompetence.
    Unfortunately this seems is really bug.
    Hope this problem will be solved in the next releases.from blueprints catalog:
    Component bindings (e.g. <h:inputText binding="#{MyBean.lastNameComponent}" />) should always be stored in request scope since their value is no longer valid after a request has been processed anyway. The component tree is reconstituted during each incoming request, changing the physical instances these component bindings will point to.
    as you see there is really problem in using session backing bean with component binding
    so that means idea with parameter looks better now because we don't need to use table binding.
    Or probably we can define some kind of pattern like couple of beans with request scope and session scope.
    for example:
    Catalog - session scope
    CatalogView - request scope
    Catalog will keep session data and CatalogView will provide some presentation logic (including some stricly visual oriented data) and access to business methods of Catalog class.
    I will send you example by e-mail (on friday) if you not mind.
    >
    Thank you for your suggestion!
    Probably I will use your idea in my application.
    By the way I'm from Kiev also.Hello from Kiev :-)
    I have one suggestion.
    I'm working on JSF form that suppose to add, editand
    delete records from table.
    Also I wanna to use scrolling by page and sorting.
    I'm trying to make this form somehow clean and
    universal as much as possible.Seems I have same tasks for now.Great! I will send some code soon.
    And maybe we can discuss every aspect how to do good JSF based application including config oriented information and utilities classes.
    -how do you work with tables without primary keyI dont' have tables without primary key :)
    -how do you make pagination by universal wayWe need just make good component for that.
    We already started in this direction.

  • How to handle the current row with radio button selection???

    Hi Everyone,
    I have one ADF page with one table and one "Find" button.
    I have created one new attribute with VARCHAR2(1) in the VO and dragged that attribute as first column in the table. And changed that first column to Radio Button to select only one row at a time.
    Upon clicking on the "Find" button i need to get the values of current selected row.
    How can i get the values of selected row?
    What code should i write to get the values of selected row in Method Binding of "Find" button?
    Any suggestions will be really useful.
    Thanks.

    Hello Kumar,
    I have some comments on your case.
    >
    I have created one new attribute with VARCHAR2(1) in the VO
    >
    1- You should create this attribute in the Entity object and then add it to the view object.
    2- Do you need that only one radio button is set at a time for all rows ? If yes then you need to handle the case when the user set more than one row and clear the value of the attribute for all other rows.
    >
    How can i get all the values of current row in backing bean method(method binding of Find method)?
    can u plz provide me the code for that?
    >
    If you mean by the current row is that the row with its value of the selected attribute is set (the radio button is set for that row), then you can write a method in the viewObjectImpl class and expose it to client interface and call it from your bean.
    here is an example based in Department table in HR schema.
    //This method is written in DepartmentsViewImpl   
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());              
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;           
            }

  • Updating the current row in vo which is bind to af:table.

    Dear all.
    I have created af table by dragging datacontrol on page.. i also have a form and onclick of button i want to update the current selected row in table..
    I am getting the current row properly but when i am trying to update the row.. it gives me following exception.
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Failed to lock the record, another user holds the lock.
    oracle.jbo.AlreadyLockedException: JBO-26030: Failed to lock the record, another user holds the lock.
    Following is my update code.
    public void update(){
    //BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Create").execute();
    BindingContext bc = BindingContext.getCurrent();
    JUApplication japp =
    (JUApplication)bc.getCurrentBindingsEntry().get("Entries_AMDataControl");
    Entries_AMImpl ampl = (Entries_AMImpl)japp.getApplicationModule();
    ViewObjectImpl vo=ampl.getEntries_VO1();
    Entries_VORowImpl row=(Entries_VORowImpl)vo.getCurrentRow();
    row.setSubject(subject);
    ClobDomain c=new ClobDomain(toXML().toString());
    row.setXmlcontent(c);
    row.setDescription("");
    //vo.setCurrentRow(row);
    //vo.executeQuery();
    //BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Execute").execute();
    BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit").execute();
    So please can anyone there tell me how can solve this problem.
    Thanks,
    Regards
    jdev version 11.1.1.4.0

    Hi Frank
    in your AM configuration, set the locking behavior to optimisticIts already optimistic.
    is bad coding practice. You should perform updates through teh ADF binding layer and not directlxy against the Application Module Impl class. You can get the >current row from the iterator the table is bound to and set the attributes on itI changed my code to following
    RowKeySet rs = getCalcTable().getSelectedRowKeys();
    Iterator it = rs.iterator();
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter =
    bindings.findIteratorBinding("Entries_VO1Iterator");
    StringBuilder sb = new StringBuilder();
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    Row currentRow = null;
    while (it.hasNext()) {
    Key key = (Key)((List)it.next()).get(0);
    currentRow = empRSIter.getRow(key);
    break;
    Entries_VORowImpl row=(Entries_VORowImpl)currentRow;
    row.setSubject(subject);
    ClobDomain c=new ClobDomain(toXML().toString());
    row.setXmlcontent(c);
    row.setDescription("");
    BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit").execute();
    But it still gives me same error.
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Failed to lock the record, another user holds the lock.
    oracle.jbo.AlreadyLockedException: JBO-26030: Failed to lock the record, another user holds the lock.
    Any suggestion appreciated..
    Thanks
    Regards.

  • How to Select the Current Row When Using af:iterator?

    Hello all,
    I encounter the following problem when using af:iterator to display data from
    a View Object:
    When trying to display the content of a row via a popup, only the first row is
    returned no matter which row is selected. So a selection of the current row
    should exist or some other method which should allow the access to the
    current row.
    The af:table has a selectionListener attribute which permit to achieve this.
    Does anyone know about some similar attribute or some method for
    selecting the current row when the af:iterator is used?
    Thank you,
    Mirela

    I would be interested in the answer to this basic question as well. I cannot get the selected row value of an attribute in an iterator for a view if I simply set-up a attribute binding to the iterator. It seems that this should be possible. I've had no other option but to obtain the current row and the related attributes programmatically. This works fine, but if there is a more elegant option, then I'd certainly like to use it.
              <af:table value="#{bindings.CompaniesView1.collectionModel}"
                            var="row"
                            rows="#{bindings.CompaniesView1.rangeSize}"
                            emptyText="#{bindings.CompaniesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.CompaniesView1.rangeSize}"
                            selectedRowKeys="#{bindings.CompaniesView1.collectionModel.selectedRow}"
                            rowBandingInterval="0" id="tCompanies"
                            summary="Companies"
                            width="100%"
                            rowSelection="single"
                            binding="#{CompanyBackingBean.companiesTable}">Page Def:
        <attributeValues IterBinding="CompaniesView1Iterator" id="Id">
          <AttrNames>
            <Item Value="Id"/>
          </AttrNames>
        </attributeValues>I should be able to get the Id attribute value of the current selected row using "#{bindings.Id}", right? Well, it doesn't work for me. Any ideas?
    Thanks

  • Is there a way to make the current row not editable

    Hi, I'm using JDev 11.1.1.2
    In my usecase I have a Form , navigateable with next/previous , and for every row a I have a calculation which makes the row editable or not.
    For now I made it with disabled property on every input component set to some bean property which is calculated every time.
    My question is if there is some general way to make an Entity not updateable ?
    I tried with doDML() ... but the problem there is that this method is not called when switching the current row but rather when commiting. So the user can modified several rows and when pressing commit it will prevent some of the to be committed which would be confusing.
    Is there a method in the ViewObject that i can overwrite which is called every time the current row is changed? So I can see if the row was modified or not.
    Thanks, agruev

    Yes, there is always isAttributeUpdateable() in the ViewRowImpl, which you can override and enable/disable your attributes based on an enabling/disabling condition.
    Here is an example:
    public boolean isAttributeUpdateable(int i) {
    boolean updateable = false; /disable by default all arguments
    // enable, if your condition is met
    if ( meets_your_condition )
    updateable = super.isAttributeUpdateable(i); // let the framework decide based on your declarative settings
    return updateable; // return true/false indicator
    Nick

  • Page change the current row when concurrent users press save in the same ti

    I have a problem that appear only when a lot of users are running at the same time
    that I have an editable form that have save button some times when I press save the current row that I edit is changed or return null row.
    for example imagine that I edit employee that has Id = 50 when a lot of users running on the application at the same time when I press save the record changed to another employee that has id = 49 or returns empty form
    in my code for save I call application module method that have code similar to this
            myViewRowImpl viewimpl =
                (myViewRowImpl )getMyView().getCurrentRow();
            getDBTransaction().commit();I build my ADF fusion web application using ver 11.1.1.3

    Hi,
    sounds like a passivation problem.You can also try and change the AM pool size.
    Read up here:
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcservices.htm#sthref873
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcampool.htm#sm0299
    Frank

  • Maintain the current row position of a table after refresh.

    Hi,
    I use a poll to refresh tables continuously. when a table is refreshed, the current referring row is reset.
    To maintain the current row position after a refresh I use the following poll method.
    public void refreshTableT1(PollEvent pollEvent) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding dcb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bindings1 = (DCBindingContainer) dcb.getValue(fctx);
    DCIteratorBinding dciter = bindings1.findIteratorBinding("<VOIterator>");
    if(dciter!=null){
    if(dciter.getCurrentRow()!=null){   
    Key current_row_key = dciter.getCurrentRow().getKey();
    dciter.executeQuery();
    if(current_row_key!=null){
    try{
    dciter.setCurrentRowWithKey(current_row_key.toStringFormat(true));
    }catch(Exception ex) {
    System.out.println("Exception in current_row_key");
    }This works for normal tables well. But when I use it to master-detail tables (pair of tables) it does not.
    At the master-detail tables, before the first data fetch, it works well. if we go below the first data fetch, it sets the current row into another position.
    how can I overcome this...??
    Thanks,
    Dinuka.

    Hi Mr.Frank,
    I have an association in two VOs.
    for example: There are 2 tables called Emp and Dept. Every Department has Employees. so there is an association (both tables have a common column). Master table is the Dept table. when you click on one record of the Dept table Detail table will show the details of the employees belongs to that selected department. That's what I referred as master-detail tables. first one is master table; second one is detail table.
    When the web page loads all the table data is not fetched from the db (it will depend on the fetch size). when we scroll down the table data fetch happens again and again.
    think my data fetch size is 25 rows per time.
    Suppose we use mine poll method and think I have clicked on the 20 ^th^ row of table1(master table). then the table2 will display details belongs to selected department. that is OK even after refresh. that works well.
    when I go to 30 ^th^ row data fetch will happen (my fetch size = 25)
    when I click on the 30 ^th^ row of the table1(master table), table2 will display details belongs to selected department. but after the poll method is called the selected row at the table1 disappears and is set to another position. now the 30 ^th^ row is not in the 30 ^th^ position. but it is the selected row and table2 displays correct details.
    I think you have got the problem now. :D
    Thanks a lot.
    Dinuka.

  • Fetch the current row in executeQueryForCollection

    Here is what I have:
    Master-detail-detail
    VO1
    --VO2 via VO1VO2Link
    -----VO3 via VO2VO3Link
    I am editing or creating new record in VO3 (Say UIX input form) but want to implement 'rollback' button and go back to the CURRENT row in VO2 (WITHOUT RESETING ITERATORS!!!!!!!). For the sake of this thread let's just say that the process of doing this is extremely frustrating and that I have to debug certain things so my idea was to take a look into the WHATEVER is the CURRENT row in executeQueryForCollection of VO2:
    //in VO2ViewImpl.java
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams)
        // TODO:  Override this oracle.jbo.server.ViewObjectImpl method
        Row currentRow = this.getCurrentRow();
        if (currentRow != null)
           Object[] o = currentRow.getAttributeValues();
      //    if (o!=null)
            //System.out.println("val[0]= " + o[0]);
            //System.out.println("val[0]= " + o[1]);
            //System.out.println("val[0]= " + o[6]);
            //System.out.println("val[0]= " + o[8]);
    }My application breaks at Object[] o = currentRow.getAttributeValues();
    for some reason? Why???
    The error displayed is:
    JBO-26100: An error occurred after commit was performed.
    The bottom line question is what is the current query in executeQueryForCollection?

    Here is what I have:
    Master-detail-detail
    VO1
    --VO2 via VO1VO2Link
    -----VO3 via VO2VO3Link
    I am editing or creating new record in VO3 (Say UIX input form) but want to implement 'rollback' button and go back to the CURRENT row in VO2 (WITHOUT RESETING ITERATORS!!!!!!!). For the sake of this thread let's just say that the process of doing this is extremely frustrating and that I have to debug certain things so my idea was to take a look into the WHATEVER is the CURRENT row in executeQueryForCollection of VO2:
    //in VO2ViewImpl.java
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams)
        // TODO:  Override this oracle.jbo.server.ViewObjectImpl method
        Row currentRow = this.getCurrentRow();
        if (currentRow != null)
           Object[] o = currentRow.getAttributeValues();
      //    if (o!=null)
            //System.out.println("val[0]= " + o[0]);
            //System.out.println("val[0]= " + o[1]);
            //System.out.println("val[0]= " + o[6]);
            //System.out.println("val[0]= " + o[8]);
    }My application breaks at Object[] o = currentRow.getAttributeValues();
    for some reason? Why???
    The error displayed is:
    JBO-26100: An error occurred after commit was performed.
    The bottom line question is what is the current query in executeQueryForCollection?

  • Losing the current row without doing anything

    I using 10g and my page have a VOR (viewobject readonly) to control form data but...
    I'm losing several times the current row ... for example I put this code in a button:
    public String clickAction() {
    AdminUCAtoCartorarioAMImpl am = null;
    try {
    am = ( AdminUCAtoCartorarioAMImpl )super.getApplicationModule( "AdminUCAtoCartorarioAMDataControl" );
    am.getAmbienteEscaninhoVOR().getCurrentRow(); //Here, sometimes brings me null.
    } catch (Exception e) {
    e.printStackTrace();
    return null;
    }

    User,
    You give us the symptom of the problem, but
    I'm losing several times the current rowdoesn't help anyone to help you pinpoint what might be the cause. Under what circumstances does the current row come across as null? Are you manually iterating through the VO's row set somewhere? What happens before the current row is "lost?" What specific version (your tag indicates 10g, but specifically which version) of JDeveloper/ADF are you using? Does this occur only when deployed, or does it occur when running in the embedded OC4J.
    One thing for you to try... if it occurs "sometimes," seemingly randomly under load, try turning off Application Module Pooling and re-test. If it occurs every time with pooling turned off, you are likely seeing some issue related to passivation/activation - which is why it would be critical to mention the exact version; there are known issues with specific versions, and there are patches available.
    John

  • Select the current row

    hi.,
    I am using jdev 11.1.5
    can any would please tell me how to select the current row in a table and perform operations in it.,
    My Scenario:
    I had created a table.,
    If the user clicks the button named post it must check the attribute [
    Year] and the Status must be updated to all the year
    For eg;
    St Year
    N 201011
    N 201112
    if the user clicks the button The st attribute should be updated with corresponding Year
    so that the N must be updated to P with the year 201011 now my output should be
    st Year
    P 201011
    N 201112
    any one can pls help me

    Hi..
    You can try this using In built Bindings.For that Table need row selection single and need form using same VO.for update drag Commit operation as a button to form.
    http://www.mandsconsulting.com/adf-table-row-selection-event-update-form

  • Get three previous records of the current record in an Oracle Form

    Hi,
    I need to get three previous records of the current record in an Oracle Form
    Sorry for the lengthy explanation:
    I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
    SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
    COLL_TIME
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    10 rows selected.
    SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
    TO_CHAR(COLL_TIME)
    12-aug-2005:02:42:00
    12-aug-2005:02:43:00
    12-aug-2005:02:44:00
    12-aug-2005:02:45:00
    12-aug-2005:02:46:00
    12-aug-2005:02:47:00
    12-aug-2005:02:48:00
    12-aug-2005:02:49:00
    12-aug-2005:02:50:00
    12-aug-2005:02:51:00
    10 rows selected.
    This is the Requirement:
    In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
    (i.e. 12-aug-2005:02:46:00)
    When the fifth record is the current_record and When I click a button, three previous records of the
    current_record should be populated on the screen.
    See what I did:
    I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
    I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
    which are less than the current record and ORDER BY DESC.
    CANVAS:
    Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
    But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
    second block (BLK2) is empty.
    So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
    three previous records of the current record( :BLK1.COLL_TIME)
    (off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
    This is the code I wrote in the trigger and followed by the error:
    1 BEGIN
    2 DECLARE
    3 cursor c1 IS
    4           SELECT MONITOR_ID,
    5               SAMPLE_ID,
    6               COLL_TIME,
    7               DEW_POINT
    8          FROM ARCHIVE_DATA;
    9 cursor c2(passing_date IN date) IS
    10           SELECT MONITOR_ID,
    11               SAMPLE_ID,
    12               COLL_TIME,
    13               DEW_POINT
    14          FROM (SELECT MONITOR_ID,
    15               SAMPLE_ID,
    16               COLL_TIME,
    17               DEW_POINT
    18          FROM ARCHIVE_DATA
    19          ORDER BY COLL_TIME desc)
    20      WHERE COLL_TIME < passing_date;
    21     BEGIN
    22     FOR cur_rec in c1
    23     LOOP
    24          IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
    25     FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
    26          LOOP
    27      IF c2%rowcount < 4 then
    28               BEGIN
    29               INSERT INTO THREE_RECS
    30                    values(second_cur_rec.MONITOR_ID,
    31                         second_cur_rec.SAMPLE_ID,
    32                         second_cur_rec.COLL_TIME,
    33                         second_cur_rec.DEW_POINT);
    34               COMMIT;
    35               END IF;
    36 END LOOP;
    37 END IF;
    38 END LOOP;
    39 END;
    40 END;
    This is the error I am getting:
    Error 103 at line 14
    Encountered the symbol "(" when expecting one of the following
    a PL/SQL variable or double quoted string
    an expanded name
    an expanded name link
    a table reference __expression
    a key word
    Resuming parse at line 126, column 46
    Thanks in advance

    Change C2 to:
    cursor c2(passing_date IN date) IS
      SELECT MONITOR_ID, SAMPLE_ID,
                   COLL_TIME, DEW_POINT
        FROM ARCHIVE_DATA
        WHERE COLL_TIME < passing_date
        ORDER BY COLL_TIME desc;And rather than populating a table with the three records, you could just select the three records using: where COLL_TIME between Prev3_time and Prev1_time

Maybe you are looking for

  • I tunes synch to Honda car audio system

    How do I synch my playlist in Itunes to my 2011 Honda car audio system using a flash drive?

  • Possible to record solo automation from a MIDI controller?

    I am using a Novation SL MKII midi controller with Automap in Logic Pro 9.  I am trying to figure out how to record the solo automation feature from the MIDI input.  I select the track, and then select the 'Solo' section from the automation tools.  I

  • How to acces and display datas storaged in cache for a SUP 2.0 workflow?

    HI to all. I have an application with a item menu which obtains data thought a online request. the result is shown is a listview. My problem is when my BlackBerry has no conection ( offline scenario). When I select the menu item, I obtain an error. H

  • Sales area is different in sales order

    Hi When i try to create a sales order in sales area say 1000/12/05, and enter the material say X which contain the division 10 in MM01. The system is showing the messege "ship to party ABC not defined for sales area 1000/12/10. but when in the initia

  • I am working on serarch engine in java want help from you

    Hi I am making some kind of search engine in java.In which i want to search initials from database(ms access) suppose to search united states of america we type usoa so how can i do that from where to i start can anybody plz......... Edited by: Karam