Is this safe to use sort utilities in 17.4 version

Hi,

 

Is this safe to use sort utilities in 17.4 version ?

DO you recommend to use this or not ?

  Discussion posts and replies are publicly visible

  • If you don't want to get into complexity of compatibility of plugin, you can use below code.
    Here I am giving you an example to sort data based on datatype.
    Below example is of year sorting. (Integer)
    =========================================
    create a rule named getYearObject

    code....
    {year:ri!year}

    input...
    year (number integer)
    =========================================
    create a parent rule named getYearObjectArray

    code...
    a!foreach(
    items:ri!years,
    expression:rule!getYearObject(fv!item)
    )

    input...
    years (number integer) multiple
    =========================================
    In your master rule write below code.
    For understanding I am writing code step by step.

    local!yearDummyData:{2011,2012,2002,2014},
    local!pagingInfo:a!pagingInfo(startIndex:1, batchSize:-1 sort: a!sortInfo(field: "year",ascending: true()))
    local!yearObjects:rule!getYearObjectArray(years:local!yearDummyData),
    local!sortedYears:todatasubset(local!yearObjects,local!pagingInfo),
    local!answer:index(local!sortedYears.data,"year",{})

    Hope this works as standalone code.

    Regards,
    Mayur Mondhe