---
title: "Natural Sort"
canonical: "https://support.appfire.com/space/REPS/472914852/Natural%20Sort"
format: markdown
---
> Macro (aura-html)

## Description

Sorts are based on the natural order of the specified keychain.

This is a general sorting macro that can replace some of the other sorting macros ([Date Sort](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472914801), [Number Sort](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472914876)) if desired. It will also work on any object type which implements the standard Comparator interface.

> ⚠️ Those wishing to use the natural sorting order as defined by the Text Sort macro will still need to use Text Sort, as it is a different type of "natural" sorting. Using this macro is the same as using {text-sort:xxx|mode=exact}.

> ⚠️ Previews will not show sorted data
> ⚠️ 
> ⚠️ For performance reasons, sorting macros are not executed in **Preview** mode. This means the macro content could be different when the page is published.

## Parameters

| Name | Required | Migratable to Cloud? | Default Value | Description |
| --- | --- | --- | --- | --- |
| [default] /key | - [(/)] | - [NO] |  | The keychain to filter on. |
| order | - [(X)] | - [NO] | ascending | The order to sort in. May be **ascending** or **descending**. |

## Editor View

- Not applicable.

## Macro Edit View

- Not applicable.

## Notes

- Not applicable.