removeunselected
removeunselected

The removeunselected statement deletes all unselected records from the database.

Parameters

No parameters.

Description

The removeunselected statement deletes all unselected records from the database. (Unselected records are invisible, but they are still part of the database and take up space.) Once they are removed, the records cannot be recovered unless you have previously saved them on the disk. The removeunselected statement will not ask the user to confirm before deleting the records; it assumes that the procedure writer knows what he or she is doing. This statement has the same effect as the “Delete Unselected Records” menu item.

This example deletes all records with Date prior to the current year.

    select Date => year1st(today())
    removeunselected

See Also

- addrecord -- adds a new record at the end of the current database.
- change -- replaces text with new text in the current field (selected records only).
- changeword -- replaces one word with another in the current field (selected records only).
- changewordexact -- replaces one word with another in the current field (selected records only).
- checkemptyselection -- notifies the user if a selection failed, and reverts to the previous selection.
- clearcell -- deletes the contents of the current field.
- clearrecord -- deletes the currently selected record.
- copycell -- copies the contents of the current field onto the clipboard, replacing anything previously on the clipboard.
- copyrecord -- copies the contents of the current record onto the clipboard.
- cutcell -- delete the contents of the current cell and places the deleted data on the clipboard.
- cutline -- copies the current record to the clipboard and deletes it.
- cutrecord -- copies the current record to the clipboard and deletes it.
- Data Input Validation -- validation of data entry (checking for duplicates, etc.)
- Date Search Options -- searching dates within a database.
- deleteabove -- copies the current record to the clipboard and deletes it, then moves to the record above.
- deleteall -- removes all records, leaving a single blank record.
- deleterecord -- deletes the currently selected record.
- duplicaterecord -- duplicates the current record.
- editcell -- opens the edit window for the currently active field (or cell), highlighting the data, and allows you to edit that field.
- editcellstop -- opens the edit window for the currently active field (or cell), highlighting the data, and allows you to edit that field.
- editcellwith -- opens the edit window for the currently active field (or cell), using the supplied alternate text.
- emptyfill -- fills every empty visible cell in the active field with the specified value.
- Favorite Searches -- saving and recalling favorite searches.
- fill -- fills every visible cell in the active field with the specified value.
- fillall -- modifies the operation of the following *fill* statement so that all records are modified, not just visible records.
- find -- locates the first visible record in the active database for which the specified condition is true.
- Find & Replace Dialog -- finding and replacing a word or phrase (with an option to use a regular expression).
- Find/Select Dialog -- using a dialog to search for specific data.
- findabove -- locates the next previous record (above the current record) in the active database for which the specified condition is true.
- findbackwards -- locates the last visible record in the active database for which the specified condition is true.
- findbelow -- locates the next visible record (below the current record) in the active database for which the specified condition is true.
- findid -- locates a record in the active database by its ID number (see info("serverrecordid").
- findnth -- finds the nth (2nd, 3rd, 4th, etc.) record that matches a true-false test.
- findselect -- opens the standard *Find/Select* dialog.
- findselectdialog -- opens the standard *Find/Select* dialog.
- Formula Search -- searching with a formula.
- formulafill -- fills every visible cell in the active field with the result of the specified formula.
- formulafillallfields -- fills every visible cell in all fields with the result of the specified formula.
- Handling Empty Selections in Code -- dealing with an empty selection data set.
- ifselect -- combines the select and if info("empty") operations into a single statement.
- info("empty") -- returns true or false depending on the result of the last select operation. If no records were selected the function will return true, otherwise it will return false.
- info("found") -- returns true or false depending on whether the last *find* or *next* statement was successful.
- info("selectduplicatesortwarning") -- works with the selectduplicatesnowarning statement to ascertain whether or not the database was sorted correctly when last search for duplicates was performed.
- insertbelow -- inserts a new record below the current record.
- insertbelowcarriagereturn -- inserts a new record below the current record and moves to the first column.
- insertrecord -- inserts a new record above the current record.
- moverecorddown -- moves the current record down one line.
- moverecordup -- moves the current record up one line.
- nextmatch -- locates the next visible record in the active database for which the condition specified in the most recent Find statement is true.
- Numeric Search Options -- searching numbers within a database.
- outlinelevel -- expands or collapses the entire database to show a specific level of data or summary level.
- pastecell -- pastes the contents of the clipboard into the current cell.
- pasteline -- inserts a new record containing the contents of the clipboard.
- pasterecord -- inserts a new record containing the contents of the clipboard.
- pleaseselectall -- makes sure that all records are selected.
- post -- assigns a value to a field in another database.
- previousmatch -- locates the previous (closer to the top) visible record in the active database for which the condition specified in the most recent Find statement is true.
- propagate -- fills all the empty cells in the current field. Each empty cell is filled with the value of the first non-empty cell above it.
- propagateup -- fills all the empty cells in the current field. Each empty cell is filled with the value of the first non-empty cell below it.
- Record Search Options -- searching via record attributes.
- Refining a Selection -- selecting a subset or superset of a previous selection."
- removeselected -- deletes all selected records from the database.
- resetallrecordidts -- resets the internal record id and time stamps for every record in the current database.
- runfieldcalculations -- performs any automatic calculations associated with the current field.
- runfieldsideeffects -- performs any side effects associated with the current field (calculations, procedures, etc.).
- runningdifference -- calculates the running difference for the current field.
- runningtotal -- calculates the running total for the current field.
- safeselect -- makes visible only those records for the active database for which the specified condition is true. If no records match, the previous selection is retained.
- safeselectwithin -- makes visible only those previously selected records in the active database for which the specified condition is true. If no records match, the previous selection is retained.
- search( -- searches through an item of text looking for a character, word or phrase. If it finds an exact match (including upper/lower case) with the character, word or phrase, it returns its position within the text item. If it does not find the character, word or phrase, it returns zero.
- searchanycase( -- searches through an item of text looking for a character, word or phrase. If it finds a match (upper/lower case may be different) with the character, word or phrase, it returns its position within the text item. If it does not find the character, word or phrase, it returns zero.
- Searching -- searching a database to find or select information.
- select -- makes visible only those records for the active database for which the specified condition is true.
- Select Duplicates Dialog -- opens the standard *Select Duplicates* dialog sheet.
- selectadditional -- adds unselected records to a previously selected group if they match the true-false test.
- selectall -- makes every record in the database visible.
- selectduplicates -- selects records containing duplicate information in the database.
- selectduplicatesnowarning -- selects records containing duplicate information in the database.
- Selecting with the Context Menu -- searching for information related to the current cell.
- selectreverse -- makes every visible record invisible, and every invisible record visible.
- selectwithin -- uses a Boolean formula to exclude records from a previously selected group.
- sequence -- fills every visible cell in the current field with a numeric sequence.
- speedcopy -- copies multiple adjacent fields from a record in one database to a record in another.
- summarylevel -- changes the summary level of the current line.
- Text Search Options -- searching text within a database.
- unpropagate -- removes repeating data from the currently selected field. If several records in a row contain the same data, this statement erases all but the first (top) value.
- unpropagateup -- removes repeating data from the currently selected field. If several records in a row contain the same data, this statement erases all but the last (bottom) value.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.