check_wl

Checks status of each row in a window list for update, insert, and delete.

Syntax

int check_wl(list-name)
list   list-name

Description

This function checks the status of each row in the window list for update, insert, and delete. If found, then it returns true. If the status of all rows is selected or tagged, then it returns false.

list-name

name of the window list to check for status.

Example

This code is placed in the normal mode section of a window trigger to determine if a user is closing an application with transactions (update, insert, or delete) outstanding. If it finds outstanding transactions, the user must commit or exit. If the user selects commit, then it returns true. Otherwise it returns false.

{
...
 if (G.key == key_quit) {
  if (check_wl(wl)){           /* outstanding transactions? */
   bell();
   if (confirm("Commit","Commit your changes?",1,0))
              /* yes = true; no = false */
    update();          /* run update trg */
   }
  }
...
}


Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999