Navigation to next record

how to navigate to the next record while in insert mode?

you can navigate to the next record after entered all requiered items... it's not necesary to do post before.
how to navigate to the next record while in insert mode?

Similar Messages

  • Navigation keys (Next Record, Previous record)

    Hi Experts
    I am facing one issue in using navigation key.
    When i use the first record and last recor key or next recor or previous recor key for any form like AR Invoice , PO etc. i am getting previous year transactions.
    How we can lock that.
    It is creating a mess between twp periods.
    Regards
    Kamlesh Vagal

    Hi,
    Suda is right, it is not possible to lock the previous year's transactions. However you will see the transactions in order of the Document Number, so if you set up your document numbering to differentiate between the different years then at least they will be in a logical order.
    Hope it makes sense.
    Nat

  • How to implement JSF text input down-arrow key = next record navigation?

    Hi All,
    I've got a small query which you experts might be able to help me through. I would not be surprised if such questions would already have been raised in this forum.
    Formerly, I've created an Oracle Form that allow user to quickly insert data in bulk. It only has three 3 fields - first name, second name and address. Because of the flexibility of the Oracle Form, by pressing the down arrow key, user is able to create record when the last record is detected. And vice versa by hitting the up arrow key, it will move to the previous record when the current record is not the first record. So basically, the form is very 'key-driven' and without the use of the mouse, a lot of data can be inserted very quickly and efficiently.
    I've successfully converted such form to an ADF BC JSF page using the JHeadstart toolkit. But when I showed it to my users for comment, they were really disappointed with the number of mouse interactions they need to click every time to navigate between records as well as creating new records. My question is can I build some sort of ADF JSF event handler on any of the text items to perform the following tasks:
    1.) When 'down arrow key' is pressed AND not the last record THEN
    Go to the next record.
    2.) When 'down arrow key' is pressed AND is the last record THEN
    Go to the next blank record.
    3.) When 'up arrow key' is pressed AND not the first record THEN
    Go to the previous record.
    4.) When 'up arrow key' is pressed AND is the first record THEN
    Do nothing.
    If all the four above tasks are achievable in ADF JSF, can you please guide and brief me on the steps to implement them. Or these functionalities are already available somewhere in other open source toolkits. Your help is much appreciated. Thank you and have a nice day.
    Kind Regards,
    John

    Hi Steven,
    I've tried to incoporated attached link's codes with the JHeadstart generated code inside the jspx but I still cannot get it to work. There is a lot of Javascript error and is impossible to debug.
    Regards,
    John

  • Triger for display next record in oracle forms

    hai all,
    i want to do
    when new form opened i have to add new reord that is empty new form also my new rownum will be displayed.
    now i getting first record.
    like:
    GROUP_ROWNUM:     1
    GROUP_ID:      120130
    GROUP_NAME aaaaaaaaa
    need like:
    GROUP_ROWNUM:     7
    GROUP_ID:
    GROUP_NAME
    that can be done by
    trigger for display next record in oracle forms?
    or through property seting?
    thanks in adv,
    rcs
    --------

    YES, this block is base on the DB table
    through defualt navigational button i can go to next,last,new record
    but i want create seperate form for new entry, in that i want to display
    old rownum
    formula to get rownum automatically (i am not at all typing it is system generated)
    even though i created column group_rownum for rownum
    (i can't be typing)
    LAST_RECORD;
    NEXT_RECORD; also not getting the next rownum
    i hope now understand me
    any posible way?
    thank you for your good input
    i.e.
    SQL> DESC GROUP_MSTR1;
    Name Null? Type
    GROUP_ID NOT NULL NUMBER(10)
    GROUP_NAME NOT NULL VARCHAR2(30)
    SQL> select * from GROUP_MSTR1;
    GROUP_ID GROUP_NAME
    123 AAAAAA
    124 BBBBBBBB
    125 CCCCCCCCC
    126 DDDDDDDD
    1 eeeeeeee
    2 FFFFFFFFF
    3 ggggggg
    7 rows selected.
    SQL> select rownum, GROUP_ID, GROUP_NAME from GROUP_MSTR1;
    ROWNUM GROUP_ID GROUP_NAME
    1 123 AAAAAA
    2 124 BBBBBBBB
    3 125 CCCCCCCCC
    4 126 DDDDDDDD
    5 1 eeeeeeee
    6 2 FFFFFFFFF
    7 3 ggggggg
    7 rows selected.
    -------------

  • Next record button GUI & database

    hello,
    I have a GUI that connects to a database and in the GUI I have a file menu that has first, last, prev, next on it. I want the user to be able to select either one of these words or on the image of these that are in a tool bar. i have two classes. it is a lot of code but i just need to figure out how to get to the next record under the action performed. Thank you for your time!!!
    Brian
    package Assignment2;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    import java.util.Vector;
    import java.io.*;
    public class GUIDatabase extends JFrame implements ListSelectionListener, ActionListener {
    private String path = "c:/temp/assn2Files/";
    private JButton first, last, next, prev, save;
    private JTextField fn, mi, ln, t, s, y;
    private String[] title = {"analyst", "executive", "programmer", "project leader "};
    private JComboBox titleCombo = new JComboBox(title);
    private String[] department = {"Applications", "Payroll", "Accounting", "Marketing "};
    private JComboBox departmentCombo = new JComboBox(department);
    private JList pd;
    private String myArray[] = {""};
    private DbSource source = new DbSource("empdb", true);
    String action, selectedQName, selectedQDSN, selectedQString;
    private Vector vc, vc2, vc3, pdNames;
    private DbSource dbs = new DbSource("empdb", true);
    private DbSource dbs2 = new DbSource("empdb", true);
    private DbSource dbs3 = new DbSource("empdb", true);
    private DbSource dbs4 = new DbSource("empdb", true);
    public GUIDatabase() {
    super("Employee Interface");
    //set up menus
    JMenuBar menuBar = new JMenuBar();
    JMenu navMenu = new JMenu("Navigation");
    menuBar.add(navMenu);
    navMenu.add(ListeningMenuItem("First"));
    navMenu.add(ListeningMenuItem("Prev"));
    navMenu.add(ListeningMenuItem("Next"));
    navMenu.add(ListeningMenuItem("Last"));
    navMenu.add(new JSeparator());
    navMenu.add(ListeningMenuItem("Update employee record"));
    JMenu statsMenu = new JMenu("Statistics");
    menuBar.add(statsMenu);
    statsMenu.add(ListeningMenuItem("Employees per Department"));
    statsMenu.add(ListeningMenuItem("Employees per Project"));
    //menu goes on the root pane
    setJMenuBar(menuBar);
    //instantiates buttons with images instead of text
    first = new JButton(new ImageIcon(path + "First.gif"));
    last = new JButton(new ImageIcon(path + "Last.gif"));
    next = new JButton(new ImageIcon(path + "Next.gif"));
    prev = new JButton(new ImageIcon(path + "Prev.gif"));
    save = new JButton(new ImageIcon(path + "save.gif"));
    //tooltips for buttons
    first.setToolTipText("Go to First Record");
    last.setToolTipText("Go to Last Record");
    next.setToolTipText("Go to Next Record");
    prev.setToolTipText("Go to Prev Record");
    save.setToolTipText("Save File");
    //register frame to listen for buttons' action events
    first.addActionListener(this);
    last.addActionListener(this);
    next.addActionListener(this);
    prev.addActionListener(this);
    save.addActionListener(this);
    //set up toolbar and add componenets to it
    JToolBar myToolBar = new JToolBar();
    myToolBar.add(first);
    myToolBar.add(prev);
    myToolBar.add(next);
    myToolBar.add(last);
    myToolBar.add(save);
    add(myToolBar, BorderLayout.NORTH);
    //text fields
    JTextField fn = new JTextField(30);
    JTextField mi = new JTextField(30);
    JTextField ln = new JTextField(30);
    JTextField t = new JTextField(30);
    JTextField s = new JTextField(30);
    JTextField y = new JTextField(30);
    y.setEditable(false);
    //create the pd Jlist
    pdNames = new Vector();
    JList pd = new JList(pdNames);
    LabelComponent pdText = new LabelComponent("Project Description", pd);
    pd.addListSelectionListener(this);
    // pd = new JList(myArray);
    pd.setFixedCellHeight(20);
    pd.setFixedCellWidth(90);
    // pd.addListSelectionListener(this);
    //labels
    LabelComponent fnText = new LabelComponent("First Name", fn);
    LabelComponent miText = new LabelComponent("MI", mi);
    LabelComponent lnText = new LabelComponent("Last Name", ln);
    LabelComponent tCombo = new LabelComponent("Title", titleCombo);
    LabelComponent tText = new LabelComponent("Telephone", t);
    LabelComponent sText = new LabelComponent("Salary", s);
    LabelComponent dCombo = new LabelComponent("Department", departmentCombo);
    LabelComponent yText = new LabelComponent("Years in Service", y);
    // LabelComponent pdText = new LabelComponent("Project Description", pd);
    JPanel p1 = new JPanel();
    p1.setLayout(new GridLayout(9, 2, 1, 15));
    p1.add(fnText);
    p1.add(miText);
    p1.add(lnText);
    p1.add(tCombo);
    p1.add(tText);
    p1.add(sText);
    p1.add(dCombo);
    p1.add(yText);
    pdText.add(pd);
    // pdText.setEditable(false);
    //set layout for frame
    setLayout(new BorderLayout());
    add(p1, BorderLayout.EAST);
    add(myToolBar, BorderLayout.NORTH);
    add(pdText, BorderLayout.SOUTH);
    //set up the frame properties
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(470, 550);
    setLocationRelativeTo(null);
    setVisible(true);
    if (dbs2.isConnected()) {
    boolean two = dbs2.processQuery("select e.FirstName, e.middlename, e.lastname, e.title, e.workphone, format(e.salary, 'currency'), d.departmentname, e.yearsinservice from employees e, departments d", false);
    if (two) {
    vc = new Vector();
    while (dbs2.nextRecord()) {
    vc.addElement(dbs2.getField(4));
    titleCombo = new JComboBox(vc);
    if (dbs3.isConnected()) {
    boolean three = dbs3.processQuery("select distinct(departmentname) from departments", false);
    if (three) {
    vc2 = new Vector();
    while (dbs3.nextRecord()) {
    vc2.addElement(dbs3.getField(1));
    departmentCombo = new JComboBox(vc2);
    if (dbs4.isConnected()) {
    boolean four = dbs4.processQuery("select projectdescription from projects", false);
    if (four) {
    vc3 = new Vector();
    while (dbs4.nextRecord()) {
    vc3.addElement(dbs4.getField(1));
    pd.setListData(vc3);
    if (dbs.isConnected()) {
    boolean one = dbs.processQuery("select * from employees, departments", false);
    if (one) {
    while (dbs.nextRecord()) {
    fn.setText(dbs.getField(2));
    mi.setText(dbs.getField(3));
    ln.setText(dbs.getField(4));
    titleCombo.setSelectedItem(dbs.getField(5));
    t.setText(dbs.getField(6));
    s.setText(dbs.getField(7));
    departmentCombo.setSelectedItem(dbs.getField(9));
    y.setText(dbs.getField(8));
    //project descriptions method
    /* public Vector getProjectDescription() {
    String pdSQL = "Select projectDescription from projects;";
    source.processQuery(pdSQL, true);
    //create new vector for list of project descriptions
    pdNames = new Vector();
    while (source.nextRecord()) {
    pdNames.addElement(source.getField(3));
    return pdNames;
    JMenuItem ListeningMenuItem(String label) {
    JMenuItem mi = new JMenuItem(label);
    mi.setActionCommand(label);
    mi.addActionListener(this);
    return mi;
    public void valueChanged(ListSelectionEvent e) {
    throw new UnsupportedOperationException("Not supported yet.");
    /*public void valueChanged(ListSelectionEvent e) {
    //set text boxes, state combo box
    String infoSQL = "select * from employees";
    if (source.processQuery(infoSQL, false)) {
    while (source.nextRecord()) {
    fn.setText(source.getField(1));
    mi.setText(source.getField(2));
    ln.setText(source.getField(3));
    t.setText(source.getField(4));
    // s.setSelectedItem(source.getField(5));
    y.setText(source.getField(6));
    // pd.setText(source.getField(7));
    throw new UnsupportedOperationException("Not supported yet.");
    // class for a labeled component*/
    class LabelComponent extends JPanel {
    JLabel l;
    public LabelComponent(String s, Component c) {
    setLayout(new BorderLayout());
    l = new JLabel(s);
    l.setHorizontalAlignment(SwingConstants.CENTER);
    add(l, BorderLayout.WEST);
    add(c, BorderLayout.EAST);
    public void actionPerformed(ActionEvent e) {
    //get command
    // String command = e.getActionCommand();
    // action = e.getActionCommand();
    try {
    if (e.getSource() == first){
    // new dialog(this);
    source.firstRecord();
    /*if (command.equals("Save")) {
    String updateSQL = "UPDATE Employees"
    + " SET first_name = '" + fn.getText() + "',"
    + " middle_name = '" + mi.getText() + "',"
    + " last_name = '" + ln.getText() + "',"
    + " title = '" + titleCombo.getSelectedItem().toString() + "',"
    + " work_phone = '" + t.getText() + "'"
    + " salary = '" + s.getText() + "'"
    + " department = '" + departmentCombo.getSelectedItem().toString() + "'"
    + " yearsinservice = '" + y.getText() + "'";
    // + " projectdescription = '" + pd.getSelectedItem().toString() + "'"
    // + " WHERE Customer_ID = " + IDText.getText();
    /* source.processUpdate(updateSQL);
    pd.setListData(getProjectDescription());
    } catch (Exception a) {
    System.out.println(a.toString());
    throw new UnsupportedOperationException("Not supported yet.");
    public static void main(String args[]) {
    DbSource dbs = new DbSource("empdb", true);
    if (!dbs.isConnected()) {
    System.out.println("Connection Error: " + dbs.getErrorMessage());
    System.exit(1);
    GUIDatabase m = new GUIDatabase();
    m.setVisible(true);
    m.setLocationRelativeTo(null);
    m.setDefaultCloseOperation(EXIT_ON_CLOSE);
    PHP Code:
    package Assignment2;
    import java.sql.*;
    public class DbSource {
    public ResultSet rs;
    public ResultSetMetaData rsmd;
    public String error;
    public Connection con;
    public DbSource(String b, boolean a) {
    try {
    String dataSource;
    // connect to ODBC database
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //Evaluate connection type
    if (a) {
    dataSource = "jdbc:odbc:" + b;
    } else {
    dataSource = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + b;
    //get connection
    con = DriverManager.getConnection(dataSource, null, null);
    } catch (Exception e) {
    error = e.toString();
    public boolean isConnected() {
    //test for connection validity
    boolean x;
    try {
    if (con == null || con.isClosed()) {
    x = false;
    } else {
    x = true;
    return x;
    } catch (SQLException e) {
    error = e.toString();
    return false;
    public boolean processQuery(String sqlSelect, boolean s) {
    //process sql statement passed along with whether to allow bidirectional scrolling
    try {
    Statement stmt;
    if (s) {
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    }else{
    stmt = con.createStatement();
    //Formulate ResultSet
    rs = stmt.executeQuery(sqlSelect);
    //ResultSet MetaData
    rsmd = rs.getMetaData();
    catch (SQLException e) {
    error = (e.toString());
    rs = null;
    return false;
    return true;
    public int processUpdate(String sqlStatement) {
    // process Update
    try {
    int nbr = 0;
    Statement stmt = con.createStatement();
    nbr = stmt.executeUpdate(sqlStatement);
    return nbr;
    } catch (SQLException e) {
    error = e.toString();
    return -1;
    public boolean nextRecord() {
    //proceed to next record
    try {
    if (rs.next()) {
    return true;
    } else {
    return false;
    } catch (SQLException e) {
    error = e.toString();
    return false;
    public boolean prevRecord() {
    //move cursor back one record
    boolean a = false;
    try {
    if (rs.previous()) {
    a = true;
    return a;
    } catch (SQLException e) {
    error = e.toString();
    System.out.println("Start of File");
    return false;
    public boolean firstRecord() {
    // move cursor to first record
    try {
    rs.first();
    return true;
    } catch (SQLException e) {
    error = e.toString();
    System.out.println("End of File");
    return false;
    public boolean lastRecord() {
    //move cursor to last record in result set
    try {
    rs.last();
    return true;
    } catch (SQLException e) {
    error = e.toString();
    System.out.println("End of File");
    return false;
    public String getField(int x) {
    //get field from result set
    try {
    String a = rs.getString(x);
    return a;
    } catch (Exception e) {
    error = (e.toString());
    return null;
    public String getFieldName(int x) {
    //get field name in result set
    try {
    String a = rsmd.getColumnName(x);
    return a;
    } catch (SQLException e) {
    error = e.toString();
    return null;
    public String getFieldType(int x) {
    //get field type from meta data in result set
    try {
    String a = rsmd.getColumnTypeName(x);
    return a;
    } catch (SQLException e) {
    error = e.toString();
    return null;
    public int getFieldCount() {
    //get count of columns from metadata result set
    try {
    int a = rsmd.getColumnCount();
    return a;
    } catch (SQLException e) {
    System.out.println(e.toString());
    return -1;
    public void close() {
    //close connection
    try {
    con.close();
    } catch (SQLException e) {
    public String getErrorMessage() {
    return error;
    public String[] getTables() {
    //get table metadata info
    try {
    DatabaseMetaData dbmd = con.getMetaData();
    String[] tables = {"TABLE"};
    rs = dbmd.getTables(null, null, null, tables);
    int nbrRows = 0;
    while (rs.next()) {
    nbrRows++;
    String[] tblNames = new String[nbrRows];
    rs = dbmd.getTables(null, null, "%", tables);
    nbrRows = 0;
    while (rs.next()) {
    tblNames[nbrRows] = rs.getString(3);
    nbrRows++;
    return tblNames;
    } catch (Exception e) {
    error = e.toString();
    return null;
    public String resultSetToXML() {
    //turn result set to XML formatting
    String rsToXML = "";
    try {
    rsmd = rs.getMetaData();
    // begin to write XML document
    rsToXML += ("<?xml version="1.0\"?>\r\n");
    // Root node
    rsToXML += ("<ResultSet>");
    // get metadata into XML document
    rsToXML += (" <MetaData>");
    for (int i = 1; i <= getFieldCount(); i++) {
    rsToXML += (" <Column>" + getFieldName(i) + "</Column>");
    rsToXML += (" </MetaData>");
    // get data into XML document
    rsToXML += (" <Data>");
    while (rs.next()) {
    rsToXML += (" <Row>");
    for (int i = 1; i <= getFieldCount(); i++) {
    rsToXML += (" <" + getFieldName(i) + ">"
    + rs.getString(i)
    + "</" + getFieldName(i) + ">");
    rsToXML += (" </Row>");
    rsToXML += (" </Data>");
    rsToXML += ("</ResultSet>");
    } catch (Exception e) {
    error = e.toString();
    return rsToXML;
    }

    805487 wrote:
    it is a lot of code but i just need to figure out how to get to the next record under the action performed. Thank you for your time!!!It's too much code and it's unformatted. Put tags on both sides of the code (check that it works with the preview button), then ask an exact question (none of those "I don't know what to do" ones).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Next Record in System Form

    Hi All,
    How I can move to next record (when a condition applies)?
    In other words I need the object (or sample code) that perfoms the "Next Record" in navigation menu.
    Thanks All,
    Vangelis

    Hello,
    use following statement
            SBO_Application.ActivateMenuItem("1288")
    where SBO_Application is the UI API application object.
    Rahul

  • Move to next record / wildcard search

    Hi
    Hope you can understand this explanation..
    I have searchable database for Holiday & Residential
    property here
    http://www.roomtobreathesl.com
    (search facility in the navigation menu)
    The results page for this search works fine for when you
    specify a certain
    area, certain amount of beds etc as it only shows a small
    amount of
    properties.
    However when you do a search for any area / any amount of
    rooms / any type,
    the query brings up over 40 results, so a move to next record
    is used. This
    is where the problem lies. You cannot move to next record as
    the 'Next
    record' link is looking for another wildcard search (see
    status bar).
    Any ideas how to remedy this?
    Thanks for any help
    Gary

    oops!
    Sorry sent you the previous version that's online.
    I also tried doing a search and replace and changing all
    'Request.Form' to
    'Request'
    Still didn't work.
    This is how it was when it wasn't working.
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/YotShop6.asp" -->
    <%
    Dim rsResults__MMColParam
    rsResults__MMColParam = "1"
    If (Request("yscon") <> "") Then
    rsResults__MMColParam = Request("yscon")
    End If
    %>
    <%
    Dim rsResults__ysbed
    rsResults__ysbed = "1"
    If (Request("ysbed") <> "") Then
    rsResults__ysbed = Request("ysbed")
    End If
    %>
    <%
    Dim rsResults__MMColParam3
    rsResults__MMColParam3 = "xyz"
    If (Request("type") <> "") Then
    rsResults__MMColParam3 = Request("type")
    End If
    %>
    <%
    Dim rsResults
    Dim rsResults_numRows
    Set rsResults = Server.CreateObject("ADODB.Recordset")
    rsResults.ActiveConnection = MM_YotShop6_STRING
    rsResults.Source = "SELECT * FROM YotStock WHERE Area LIKE '"
    +
    Replace(rsResults__MMColParam, "'", "''") + "' AND bedrooms
    LIKE '" +
    Replace(rsResults__ysbed, "'", "''") + "' AND type LIKE '" +
    Replace(rsResults__MMColParam3, "'", "''") + "' ORDER BY
    price ASC"
    rsResults.CursorType = 0
    rsResults.CursorLocation = 2
    rsResults.LockType = 1
    rsResults.Open()
    rsResults_numRows = 0
    %>
    "Julian Roberts" <[email protected]> wrote in message
    news:euj4if$ici$[email protected]..
    >>> Use Request instead of Request.Form for runtime
    parameters.
    >
    > You haven't done it :)
    >
    > --
    > Jules
    >
    http://www.charon.co.uk/charoncart
    > Charon Cart 3
    > Shopping Cart Extension for Dreamweaver MX/MX 2004
    >
    >
    >
    >

  • Jump to next record when current record blocked

    Dear all,
    I have a problem with my oracle forms on the trigger WHEN-VALIDATE-ITEM.
    i used that trigger to validate records...if i have a record status "sealed" i want that record wont show up.
    here is my script:
    if :documents.court_case_number is not null then
              case_id:=court_admin.case_read_pck.CcntoCasId(:documents.court_case_number);
              select sealed into cs_seal from cases where id=case_id;
              if cs_seal='D' then
                   message('court case: '||case_id||' status seal: '||cs_seal); <-- if status "D" mean : sealed >> i want to just skip that record and jump to next record, i need help the script for this stage
              else
                   return;
              end if;
         end if;
    thank you

    Hadi Wijaya wrote:
    Dear all,
    I have a problem with my oracle forms on the trigger WHEN-VALIDATE-ITEM.
    i used that trigger to validate records...if i have a record status "sealed" i want that record wont show up.
    here is my script:
    if :documents.court_case_number is not null then
              case_id:=court_admin.case_read_pck.CcntoCasId(:documents.court_case_number);
              select sealed into cs_seal from cases where id=case_id;
              if cs_seal='D' then
                   message('court case: '||case_id||' status seal: '||cs_seal); <-- if status "D" mean : sealed >> i want to just skip that record and jump to next record, i need help the script for this stage
              else
                   return;
              end if;
         end if;
    thank youDefine Skip!! When?? during navigation, Query??
    You are using WHEN-VALIDATE-ITEM trigger to validate records????
    If you want the records that are "sealed" to be excluded from your query, you can set the block's either DEFAULT_WHERE or ONETIME_WHERE clause programatically using SET_BLOCK_PROPERTY.
    Explain your requirements more clearly so we can help you.
    Tony

  • Auto skip to the next record in a multi-record defined text item

    I know that by setting the autoskip property to true, this
    allows the cursor to navigate to the next item defined in a
    block without having to press return, tab or click w/a mouse
    into the next item. What I would like to do is emulate that
    behavior using a single multiple record text in a block. In
    other words, I want the form to navigate to the next record for
    that item automatically, without having to hit the down-arrow
    key or mouse-click to the next record or whatever.
    Anyone know if that's possible?

    hi
    you can try in this way. you can set block property 'navigation
    style' to 'change record'.

  • T-SQL: Cursor is not advancing to next record

    SQL Version:  2008 R2
    Problem:  I have the code below which uses a cursor.  The cursor keeps returning the first record and does not advance to the next record in the cursor.  It appears as if the Fetch Next is not being recognized.  The Select
    Statement in the cursor declaration returns two records which is the result set I expect to be contained in the cursor record set.
    ...bob sutor
    SQL CODE:
    DECLARE
      @ProcessGroupID nchar(4)
     , @RemoveAuditUser nchar(128)
    DECLARE CertGroupCursor CURSOR FOR
     SELECT DISTINCT CertGroups.GroupCode, CertGroups.RemoveAuditUser
         --, UserControl.ProcessGroupID, UserControl.VPUserName
     FROM udCertGroups AS CertGroups
      LEFT JOIN udAuditUsers AS UserControl
      ON CertGroups.GroupCode = UserControl.ProcessGroupID
     WHERE CertGroups.GroupCode = UserControl.ProcessGroupID
      AND CertGroups.RemoveAuditUser = UserControl.VPUserName
    OPEN CertGroupCursor
     FETCH NEXT FROM CertGroupCursor INTO @ProcessGroupID, @RemoveAuditUser
     WHILE @@FETCH_STATUS = 0
     Print @ProcessGroupID + '-' + @RemoveAuditUser
     DELETE FROM udAuditUsers
      WHERE ProcessGroupID = @ProcessGroupID
       AND VPUserName = @RemoveAuditUser
     FETCH NEXT FROM CertGroupCursor INTO @ProcessGroupID, @RemoveAuditUser
    CLOSE CertGroupCursor
    DEALLOCATE CertGroupCursor
    Bob Sutor

    The real question is how to get rid of this mess. Think about the local “@remove_audit_user” as a variable; it's name is a verb, not a noun! and the NVARCHAR(n) lets you use Chinese Unicode. Why? In ISO-11179 rules , “remove_” is a called a role, and the
    audit user would be the attribute with the attribute property “_user” in a valid data model. Where is the table that models “audit_users”? It has to be here by definition. 
    One of the first rules of data modeling is that a data element has one and only one name. This is a results of the Law of Identity in Logic (A is A: to be is to be something in particular, to be nothing in particular or many things in general is to be nothing
    at all). 
    So how did “G.remove_audit_user = U.vp_user_name” occur??  ANSWER: lack of a design!
    Your “G.group_code = U.process_group_id” is wrong. An identifier is not a code! TOTALLY DIFFERENT type of data elements! Do you have a postal code or a postal id? Blood_type or blood_id?  Etc.? Have you ever read a book on basic data modeling? 
    The purpose of PRINT is debugging and not output. We had  joke in the ANSI X3H2 Committee that SQL means “scarcely Qualified as a Language” because there is no I/O. PRINT will screw up performance in so many ways. 
    In a properly designed schema, we seldom use SELECT DISTINCT; we have keys and a valid schema that does not produce redundant duplicate rows. It might be valid, but after 30+ years of SQL, I would bet against it. 
    Your statement would use an EXISTS() predicate to handle multiple columns and conditions. But you did not bother with DDL, as required by basic Netiquette, so here is the skeleton I can give you. 
    DELETE FROM UD_Audit_Users
     WHERE EXIST
           (SELECT *
              FROM UD_Cert_Groups AS G
             WHERE G.process_group_id = ?? 
               AND G.vp_user_name = ??;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • See my problem no master record move to next record

    hi master
    sir
    i have master detail block master table have all data but detail no data i need feed data in detail then i goto in detail block write value and press F10 for save
    for new record in detail
    in detail blick post-block or post_record or post_insert event i write this code
    go_block('masterblock');
    next_record;
    go_item('detailblock.item');
    but not responses no master block move to next record still and my curser sitll in last postion
    sir how i move master record after save the detail record and jump to detail block for new record
    please give me idea or code
    thanking you
    aamir

    thank for reply
    sir your help very usefull for my but when i press F10 then system show massage do you want to save change the record
    sir how i avoid that window and directly move to next record
    please give me idea
    thanking you
    aamir

  • My code not give me result and error for move to next record please see

    hi master
    sir i import this file also
    import javax.faces.event.ValueChangeEvent;
    then my error remove
    i am use this code in button event
    getMfatableDataProvider().cursorNext();
    form1.discardSubmittedValues("virtualForm1");
    and my textField is bounded with data provider table field
    please give me idea how i show next rocord in page when user press button
    thank's
    aamir

    thank for reply
    sir your help very usefull for my but when i press F10 then system show massage do you want to save change the record
    sir how i avoid that window and directly move to next record
    please give me idea
    thanking you
    aamir

  • Conditional Sum and look at next record

    First off, here is an example XML structure
    &lt;DATASET&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;1&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;30&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;1&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;20&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title2&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;1&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;40&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title3&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;2&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;30&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 5&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;2&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;80&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 6&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;3&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;90&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 7&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;3&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;90&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 8&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;4&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;30&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 9&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;/DATASET&gt;
    Is there any way to get a sum of a field grouped by two different fields? Example in my RTF I have a repeating group based on DIVISION which inserts section breaks. Using the example I have posted here what I have in my RTF template is a sum of FEE (assume there are multiple records for DIVISION though only 1 is shown here) that displays on every page for the current group. Each DIVISION is printed on its own page. However, at the end of each DEPARTMENT, I also need to print a summary total of the sum of FEE over all records for that DEPARTMENT on the same page as the last page of the last DIVISION.
    So far, I have been able to get it to do the subtotals for each DEPARTMENT as they are within the scope of my loop. The tricky part I am unsure of how best to go about doing is getting and displaying the conditional grand total. My initial idea was to use a variable and do it manually in my template but then I relaized I did not know how to find out if the next record was the first record in the next Department or not. In this case, I am hoping to stick within the realm of using straight SQL Query as my datasource because its already done. The other option I considered was nested loops and a data template but then I realized that I wasn't too sure about manually inserting the section breaks.
    Any thoughts?

    Yes, you can do that,
    Pass me the template and XML :)
    <?if:position() = last()?>
    Last Record
    <? end if ?>
    then display the sub-total for department at the last division.
    This link , gives you idea of , how to display at the last
    http://blogs.oracle.com/xmlpublisher/2008/08/continued.html
    Use
    xdofo:inline-total display-condition="last"

  • Previous and next records in a table

    Let's say I have a table where I have
    item name sequence customer number
    I want to select these three fields where name = 'INSPECTION', but I'd also like to grab the record prior to this and the record after this, regardless of the name content. I need to do it for each customer number.
    Is it possible for a novice like me to do?
    Thank you

    What is "next record" and "previous record" for you in this context? A database table doesn't have records in any specific order. They have an arbitrary order.
    If for you, the records have the sequence as an ordering information, then you could use LAG and LEAD functions.

  • How to process next record in oracle PLSQL

    Hi,
    I am processing below record set with the help of BULK COLLECT in Oracle PLSQL Procedure. While processing I am checking model is one that need not be substituted. If it is 'NA' or 'N/A', I need process next record (marked as bold in code snipet)
    Please guide me how to do it ?
    TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE INDEX BY BINARY_INTEGER;
    L_money t_get_money ;
    L_subst_model VARCHAR2(40);
    L_Notify_Manager     VARCHAR2(1);
    L_grade          VARCHAR2(20);
    L_Error_Message     VARCHAR2(1);
    BEGIN
    OPEN c_get_money ;
    FETCH c_get_money BULK COLLECT INTO L_money ;
    CLOSE c_get_money;
    FOR I IN 1..L_money.count LOOP
    -- check if the model is one that need not be substituted
    IF (upper(L_money(i). subst_model) in ('N/A', 'NA')
    THEN
    L_NOTIFY_MANAGER(I) := 'Y';
    L_GRADE(I) := 'ERROR';
    L_error_message(i) := 'substitute Model is not N/A or NA' ;
    -------Here I want to process NEXT RECORD--------
    END IF ;
    END;

    One of the solution for below version of 11g...
    DECLARE
         TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE
                                       INDEX BY BINARY_INTEGER;
         L_money              t_get_money;
         L_subst_model        VARCHAR2 (40);
         L_Notify_Manager   VARCHAR2 (1);
         L_grade              VARCHAR2 (20);
         L_Error_Message    VARCHAR2 (1);
    BEGIN
         OPEN c_get_money;
         FETCH c_get_money
         BULK COLLECT INTO L_money;
         CLOSE c_get_money;
         FOR I IN 1 .. L_money.COUNT LOOP
              IF UPPER (L_money (i).subst_model) IN ('N/A', 'NA') THEN
                   GOTO Nextrecord;
              END IF;
              L_NOTIFY_MANAGER (I)   := 'Y';
              L_GRADE (I)              := 'ERROR';
              L_error_message (i)    := 'substitute Model is not N/A or NA';
            <<Nextrecord>>
              NULL;
         END LOOP;
    END;One of the solution for 11gR1 and above...
    DECLARE
         TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE
                                       INDEX BY BINARY_INTEGER;
         L_money              t_get_money;
         L_subst_model        VARCHAR2 (40);
         L_Notify_Manager   VARCHAR2 (1);
         L_grade              VARCHAR2 (20);
         L_Error_Message    VARCHAR2 (1);
    BEGIN
         OPEN c_get_money;
         FETCH c_get_money
         BULK COLLECT INTO L_money;
         CLOSE c_get_money;
         FOR I IN 1 .. L_money.COUNT LOOP
              IF UPPER (L_money (i).subst_model) IN ('N/A', 'NA') THEN
                   CONTINUE;
              END IF;
              L_NOTIFY_MANAGER (I)   := 'Y';
              L_GRADE (I)              := 'ERROR';
              L_error_message (i)    := 'substitute Model is not N/A or NA';
         END LOOP;
    END;

Maybe you are looking for