EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
Expand all | Collapse all

Sort a Record

  • 1.  Sort a Record

    Posted Wed August 26, 2015 02:53 AM

    Hi,

    how to sort a Record in EGL?

    Kind Regards

    Marcel-D


  • 2.  Re: Sort a Record

    Posted Wed August 26, 2015 03:09 AM

    I have found something..

     

    ret = DataGridLib.util.sort(ret as any[], "BPTNR", true, false, null) as BPBEWEG_REC[];

     

    Marcel-D


  • 3.  Re: Sort a Record

    Posted Tue September 01, 2015 09:14 AM

    We use dictionaries for this. 
    Create a dictionary byKey. Dictionaries can handle all kind of types!

     

    Example

     

    testDictionary Dictionary { Ordering = byKey };entities TestRecord[];testDictionary = new Dictionary { }; for(idx int from 1 to entities.getSize() by 1)           dictionaryKey string = entities.<keyfield>;            testDictionary[dictionaryKey] = entities[idx]; end
    Jerrycan