# Rule action: Sort list

Used for: sorting a list of numbers or letters/words (alphabetically).

Used in: "THEN"-statements and "ELSE"-statements.

The name of the rule pretty much explains itself: if you have a field that contains a list, this rule will sort it for you. You can either sort ascending \[a-z or 0-9] or descending \[z-a or 9-0].

![channable\_rules\_what-does-each-rule-do-rule-sort-list-0.png](/files/83e3cd741c84d3f4dc51f1ae16aa56f7059c9858)

The result of both ways of sorting is shown below:

![channable\_rules\_what-does-each-rule-do-rule-sort-list-1.png](/files/eeff63991dfb7a08cf725623cc3554b038d14826)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-sort-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
