Import From Excel to Aggregate Field

Discussion in 'Requests' started by Naitesh, Sep 9, 2018.

    
  1. Naitesh

    Naitesh Member


    Thank You For Reply
    I have tried this to understand this function
    but something wrong

    please correct thank you

    [System: UDF]
    MyUdfStkMasterTBL1 : Aggregate : 20025
    MyUdfStkItemName1 : String : 20026
    MyUdfStkItemCat1 : String : 20027

    [#Menu: Accounts Info.]
    Add: Item :Before :mad:@locQuit:Import Stock From Excel:Call : TestFunction123
    Add: Item :Before :mad:@locQuit:Display Imported Stock :Alter:Stock Detail Master

    [Report:Stock Detail Master]
    Form: STForm
    Title: "Stock Detail Master"
    Object:company

    [Form: STForm]
    Width: 100% Screen
    Height: 100% Screen
    Background: FormClr
    Part:STPart

    [Part:STPart ]
    Line: STLineTitle,STLine
    Repeat:STLine:MyUdfStkMasterTBL1
    Break on : $$IsEmpty:$MyUdfStkItemName1
    Scroll: Vertical

    [Line:STLineTitle]
    Fields : TLSTSrNoFld, TLSTNameFld,TLSTCat
    Local : Field : Default : Delete : Border

    [Line:STLine]
    Fields : Multi SNo, STNameFld,STCatFld
    Local : Field : Default : Delete : Border

    [Field: TLSTSrNoFld]
    Use: Name Field
    Set as: "Sr"
    Width: 4
    Align: Center
    Color: BLUE

    [Field: TLSTNameFld]
    Use: Name Field
    Set as: "Stock Name"
    Width: 30
    Align: Left
    Color: BLUE

    [Field: STNameFld]
    Use : Name Field
    Storage : MyUdfStkItemName1
    Width: 30

    [Field: TLSTCat]
    Use: Name Field
    Set as: "Stock Color"
    Width: 30
    Align: Left
    Color: BLUE

    [Field: STCatFld]
    Use : Name Field
    Storage : MyUdfStkItemCat1
    Width: 30

    [Collection : NSCollimport]
    ODBC : "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=D:\NExSubManual1.xlsx"
    SQL : "Select * from [Sheet1$]"

    [Function : TestFunction123]
    10 : WALK COLLECTION : NSCollimport
    30 : INSERT COLLECTION OBJECT : MyUdfStkMasterTBL1
    40 : Set Value : MyUdfStkItemName : $_1
    50 : Set Value : MyUdfStkItemColor : $_2
    60 : Set Object Values
    70 : SET TARGET : ..
    80 : Accept Create
    100 : END Walk
    120: MSGBOX : "Status" : "Stock Item-Type Imported"
     

    Attached Files:



Share This Page