Sort household members

Hi,
How do I sort and display household members from the oldest to the youngest? I’ve used uhc.contacts_default_sort but it seems not to be working.

Hi @inromualdo, great to have you in the CHT forum!

I don’t think there is an option to sort contacts by age. From the documentation, UHC mode allows you to also sort contacts by last visited date or alphanumerically.

Hi @inromualdo

Sorting household members should still be possible. As of configurable hierarchies, the configuration was moved to the contact_types config - however this is apparently not documented.

Can you please try adding a field called sort_by_dob: true to your household member type that you wish to sort by date of birth, like:

"contact_types": [    
      ..... 
      {
        "id": "person",      
        ..... 
        "person": true,
        "sort_by_dob": true
      }
]
4 Likes