Sorting in read only grid (gridfield) with positive, negative and blank values

We have a read only grid column which displays a decimal value. The value can have positive, negative or blank values. 

What we want to do is always keep the blank values at the bottom. So when user sorts by the column either ascending or descending, it should only sort non blank values and keep blanks at the end. 

Is there anyway to achieve this in appian with read only grid?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You'll have to roll your own sorting algorithm in order to do that.

    It should actually be relatively straightforward.  You'd pull a list of all nulls stored in a local variable, then filternulls to get the null-less list in another local variable, the sort the null-less list ascending or descending, last append the list of nulls you got from step one to the end of the sorted sub-list.

Reply
  • 0
    Certified Lead Developer

    You'll have to roll your own sorting algorithm in order to do that.

    It should actually be relatively straightforward.  You'd pull a list of all nulls stored in a local variable, then filternulls to get the null-less list in another local variable, the sort the null-less list ascending or descending, last append the list of nulls you got from step one to the end of the sorted sub-list.

Children