list_stat

Sets/gets the status of the current item in the list.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

int list_stat(list-name[,status])
list          list-name
int           status

Description

If status is provided, updates current item's status before returning.
list-name specifies the list in which current item resides. If it is WL and the new status is item_select, the item's saved row is reset.

status specifies a new current item status. See trim.h for a list of the possible constant values.

Notes

See lock_row() for a description of the use of the saved row. The following TRIMpl functions look at or modify the item status internally:
list_dup()     New item status set to item_insert
list_mod()     Update: Status set to item_update
               Insert: Status set to item_insert
list_modcol()  Status set to item_update
list_view2()   Chosen item status set to item_tagged
move_f2l()     Move field values to window list and set status
               to item_update if not already item_insert.

Example

Prints the current item's status.
{
 list xx;
 xx = list_open("20 16 10", 1000, "RT 20");
 list_mod(xx, 1, "1", "2", "3");
 list_mod(xx, 1, "4", "5", "6");
 printf("Current item: " ^^ list_curr(xx,0));
 printf("Status: " ^^ list_stat(xx));
 list_close(xx);
}