Redefine list

Command group Flag affected Reversible Execute on client Platform(s)
Lists NO NO NO All

Syntax

Redefine list {list-of-field-or-file-names (F1,F2..F3,F4)}

Deprecated Command

This command has been deprecated and is no longer visible in the Code Assistant in the Code Editor (it will not appear when you type the first few characters), although it is still present in Omnis Studio and will continue to function if used in legacy code. You can show this command by disabling the appropriate Command Filter in the Modify menu in the Code Editor.

Description

This command redefines the columns of the current list. No change is made to the data currently stored in the list, or to the data type of each column; the command only changes the field name associated with each column. If you pass more field names to Redefine list than the current number of columns, the extra names are ignored. List boxes on windows will no longer display the data in the list unless you change their $calculation property to include the new variable or field name(s).

Example

Set current list iList1
Define list {iCol1Date,iCol2Num,iCol3Char}
Add line to list
# redefine the 3rd column in the list to hold boolean values
Redefine list {iCol1Date,iCol2Num,iCol4Boolean}
# the boolean field value is converted into a character field format 'YES' etc and then add to the list
Add line to list
# or do it like this
Do ilist.$redefine(iCol1Date,iCol2Num,iCol4Boolean)