List - Export Method

Exports list data to text file

Member of List (PRIM_LIST)

Parameters

NameTypeData TypeDescription
FileName*Input (Optional)StringSpecifies the file name of the text file to export

Details

Export method of List (PRIM_LIST) will export the lists data to a text file.

The file name can be specified using the filename parameter.

Example

In this example clicking the save button will download the list a file called Mylist.txt.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Layoutmanager(#LayoutWebPage)

    Define_Com Class(#PRIM_TBLO) Name(#LayoutWebPage)
    Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutWebpageRow) Displayposition(1) Parent(#LayoutWebPage)
    Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutWebpageColumn) Displayposition(1) Parent(#LayoutWebPage)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem_List) Alignment(TopCenter) Column(#LayoutWebpageColumn) Manage(#List) Parent(#LayoutWebPage) Row(#LayoutWebpageRow) Margintop(72)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem_Buttom) Alignment(BottomRight) Column(#LayoutWebpageColumn) Manage(#Export) Parent(#LayoutWebPage) Row(#LayoutWebpageRow) Sizing(None) Marginbottom(24) Marginright(24)

    Define_Com Class(#PRIM_LIST) Name(#List) Columnheaderheight(48) Columnlines(False) Displayposition(2) Height(728) Left(0) Parent(#COM_OWNER) Rowheight(48) Tabposition(1) Top(72) Width(1200)
    Define_Com Class(#PRIM_LIST.String) Name(#ListColumn) Columnunits(Proportion) Columnwidth(1) Displayposition(1) Parent(#List) Sortonclick(True) Source(#xDemoAlpha128)
    Define_Com Class(#prim_md.ActionButton) Name(#Export) Parent(#COM_OWNER) Displayposition(1) Tabposition(2) Left(1120) Top(720) Themedrawstyle('DarkAccent') Icon('save') Iconheight(32) Iconcolor(Theme50)
    
        Evtroutine Handling(#COM_OWNER.Initialize)
      
            Begin_Loop Using(#xDemoNumber) To(100)

                #xDemoAlpha128 := 'Entry: ' + #xDemoNumber.AsString

                Add_Entry To_List(#List)

            End_Loop

        Endroutine

        Evtroutine Handling(#Export.Click)

            #List.Export( 'MyList.txt' )

        Endroutine
End_Com

See also

All Component Classes

Technical Reference

EPC1420030 V14sp2 November 2018