Chips solution probably the quickest.
I ended up writing to a tab deliminated text file, so I could load it up
into a spreadsheet.
$vH_FileRef:=Create document($vT_FilePath)
LISTBOX GET
ARRAYS(*;$vT_ListboxName;$aT_ColumnNames;$aT_HeaderNames;$aptr_ColumnVars;$aptr_HeaderVars;$aB_ColVisible;$aL_ColStyle)
$ vL_rCount:=Size of array($ aptr_ColumnVars{1}->)
For($vL_rNum;1;$vL_rCount)
CLEAR VARIABLE($vT_TextToWrite)
$vL_Count:=$aT_ColumnNames
for($vL_cNum;1;$vL_cCount)
if(length($vT_TextToWrite)#0)
$vT_TextToWrite:=$ vT_TextToWrite +Char(tab)
end if
Case of
:(Type($vptr_Column->{$vL_cNum})=Is Text)
$vT_TextToWrite:=$vT_TextToWrite+$vptr_Column->{$vL_cNum}
: (Type($vptr_Column->{$vL_Num})=Is date)
$vT_TextToWrite:=$vT_TextToWrite+String(Year
of($vptr_Column->{$vL_Num}))+"-"+String(Month
of($vptr_Column->{$vL_Num}))+"-"+String(Day of($vptr_Column->{$vL_Num}))
:(Type($vptr_Column->{$vL_cNum})=Is Time)
$vT_TextToWrite:=$vT_TextToWrite+String($vptr_Column->{$vL_cNum};HH MM SS)
:(Type($vptr_Column->{$vL_cNum})=Is Longint)
$vT_TextToWrite:=$vT_TextToWrite+String($vptr_Column->{$vL_Num})
else // unsupported array types
// don't write to text file.
end case
end for // each column
$vH_FileRef:=Append document($vT_FilePath)
SEND PACKET($vH_FileRef;$vT_TextToWrite)
end for // each row
CLOSE DOCUMENT($vH_FileRef)
Adam Bevan
Developer & CEO, Argus Productions Inc.
<https://www.facebook.com/ArgusProductions/>
On Tue, 13 Aug 2019 at 15:29, Peter Mew via 4D_Tech <[email protected]>
wrote:
> Hi
> Does anyone have a routine, component, plugin, or pointer to the right
> direction, that will save the contents of an array based listbox, so that
> the data can be restored at a later date
> thanks
> -pm
> 4d v13
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive: http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************