Sorting Parent rows but not child rows

Is it possible to sort just the Parent rows but not the child rows? Our parent rows need to be sorted in alpha order however our child rows are in order of task and we don't want them to be sorted.

Answers

  • jmyzk_cloudsmart_jp
    jmyzk_cloudsmart_jp ✭✭✭✭✭✭

    Hi @DeniseMetz

    If you want to sort with the top-level parent, you can add a helper column like this;

    [Top Parent] =IF(COUNT(ANCESTORS()) = 0, [Primary Column]@row, INDEX(ANCESTORS(), 1))
    

    Then, sort the sheet with the column.

    https://app.smartsheet.com/b/publish?EQBCT=254c2958876c4ce7916d7766c9ef6447 (Link to the editable published sheet)

    After the Top Parent Sort.

    As you can see, the 2nd level parents and their children keep the original order.

    Experiment

    I experimented with sorting by the primary column.

    After the sort

    The experiment shows that after sorting, though the parent-child relationship or hierarchy is intact, all the rows are sorted alphabetically.

    I did not know this "sort behavior" of the primary column. It's interesting.