deleterecord
The deleterecord statement deletes the currently selected record.
Parameters
No parameters.
Description
This statement removes the entire active record from the database. After deleting the record, all other records below the current record move up one row in the data sheet window and the cursor will reside on the next visible record immediately following the deleted record. On a single record view form, the display will change to the next visible record after the deleted record.
This statement will delete the currently active record unless there is only one record selected. You can never delete the last visible record from any Panorama database.
This simple example will remove the active record from the database.
deleterecord
This example checks all selected records in the Stock database one by one and deletes a record when the Status field contains the word old for that record. It then pastes the deleted record into the Old Stock database. If only one record remains in Stock and it is an old record the procedure will warn you that you cannot delete it.
firstrecord
loop
if Status contains "old"
if info("selected") = 1
beep
message "You cannot delete the last record."
stop
else
copyrecord
deleterecord
window "Old Stock"
pasterecord
window "Stock"
endif
endif
downrecord
until info("stopped")
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).
- 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.)
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- post -- assigns a value to a field in another database.
- 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.
- removeselected -- deletes all selected records from the database.
- removeunselected -- deletes all unselected 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.
- 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.
- 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
10.0 | Updated | Carried over from Panorama 6.0, but no longer copies to the clipboard. |