# Knack is alphabetizing grouped entries (SOLVED)

**URL:** https://forums.knack.com/t/knack-is-alphabetizing-grouped-entries-solved/16063
**Category:** API & Custom Code
**Created:** [April 23, 2024, 4:11am UTC](https://forums.knack.com/t/knack-is-alphabetizing-grouped-entries-solved/16063 "2024-04-23T04:11:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Steve11](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Steve11](https://forums.knack.com/u/Steve11)
#### Post date: [April 23, 2024, 4:11am UTC](https://forums.knack.com/t/knack-is-alphabetizing-grouped-entries-solved/16063/1 "2024-04-23T04:11:21Z")

</div>

I am submitting API data via cURL and here is an example of part of my submission:

“field\_65”:[{“id”:“648b76dbdc31150029xxxxxx”,“identifier”:“Person One”},{“id”:“648b77e49a7ea40027xxxxxx”,“identifier”:“Another Person”},{“id”:“64874377b110820027xxxxxx”,“identifier”:“Just One More”}],

The data gets entered into your database but instead of staying in the order that I have submitted them, they get saved and returned to me in alphabetical order. Am I doing something wrong or is there a way to prevent this?

Here is the return from the server after I submit it which is now out of order:

"field\_65":"\<span class=\"648b77e49a7ea40027xxxxxx\"\>Another Person  
\<span class=\"64874377b110820027xxxxxx\"\>Just One More  
\<span class=\"648b76dbdc31150029xxxxxx\"\>Person One",  
"field\_65\_raw":[{"id":"648b77e49a7ea40027xxxxxx","identifier":"Another Person"},{"id":"64874377b110820027xxxxxx","identifier":"Just One More"},{"id":"648b76dbdc31150029xxxxxx","identifier":"Person One"}],\

Steve

---

<div class="post-metadata">

### Author: ![Kelson](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/kelson/32/762_2.png) [@Kelson](https://forums.knack.com/u/Kelson)
#### Post date: [April 23, 2024, 7:59pm UTC](https://forums.knack.com/t/knack-is-alphabetizing-grouped-entries-solved/16063/2 "2024-04-23T19:59:32Z")

</div>

You’ll probably need to add a ‘date created’ field and sort by that date field.

Here’s the docs for sorting:

> **[Sorting](https://docs.knack.com/docs/sorting)**
>
> You can indicate sorting by appending with the following parameters: sort\_field: The field key that you want to sort bysort\_order: The order you want to sort by that field asc (ascending)desc (descending)...

Best,

---

<div class="post-metadata">

### Author: ![Steve11](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Steve11](https://forums.knack.com/u/Steve11)
#### Post date: [April 24, 2024, 4:23am UTC](https://forums.knack.com/t/knack-is-alphabetizing-grouped-entries-solved/16063/3 "2024-04-24T04:23:40Z")

</div>

Thanks but no. These names are called from another linked database so modifying the names like putting a number in front of them (for sorting purposes) isn’t possible. These three names are all entered within one field and I want them back out in the same order that I put them in. Knack is changing the data within my entered field.

---

<div class="post-metadata">

### Author: ![Steve11](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Steve11](https://forums.knack.com/u/Steve11)
#### Post date: [April 24, 2024, 3:52pm UTC](https://forums.knack.com/t/knack-is-alphabetizing-grouped-entries-solved/16063/4 "2024-04-24T15:52:43Z")

</div>

Knack replied and appears to have shown me the way to fix the issue.
