list_delimit

Inserts a delimiter between fields of a window list.

Syntax

list  list_delimit(list-name,delimiter)
list  list-name
expr  delimiter

Description

list_delimit() excludes dbkey, the first column of a window list, and inserts the delimiter between the remaining fields.

list-name

identifies the name of the list.

delimiter

specifies the character to use to separate fields in the window list.

Example

This trigger saves a window list with tab delimited fields. The delimited list is saved to the client's cache directory with an .xls suffix and opened with a system call to Excel.

 {
 int pos;
 list temp_list;

 if (list_rows(win-name.wl) && list_curr(win-name.wl,@struct.no)){
   list_all(win-name.wl);             /* get all rows from db */
   temp_list= list_copy(win-name.wl);  /* copy wl to temp_list */
   temp_list= list_delimit(temp_list,chr(9));/*insert tab between fields*/
   G.fname= list_curr(win-name.wl,@struct.no);/* use struct valuw as
     /* filename; save delimited list w/ 'xls' suffix */
   list_save(temp_list,"gui!c:\daspects\cache\","xls");

   winexec("C:\Program Files\Microsoft Office\Office\EXCEL.EXE "
           "gui!c:\daspects\cache\"^^G.fname^^".xls");
   temp_list= NULL;
   }
 }


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