# Sorting line items (for DocsAutomator)

**URL:** https://community.glideapps.com/t/sorting-line-items-for-docsautomator/78699
**Category:** Ask for Help
**Created:** [December 19, 2024, 8:56pm UTC](https://community.glideapps.com/t/sorting-line-items-for-docsautomator/78699 "2024-12-19T20:56:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Rupert](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rupert/32/44178_2.png) [@Rupert](https://community.glideapps.com/u/Rupert)
#### Post date: [December 19, 2024, 8:56pm UTC](https://community.glideapps.com/t/sorting-line-items-for-docsautomator/78699/1 "2024-12-19T20:56:29Z")

</div>

Hi everyone,

quick question since a user just asked this: How would you define the sort order of line items in order to add them to documents via DocsAutomator? I feel I know this, but am blanking right now… Also couldn’t find it in the community…

Does this require Javascript?

Thank you!

---

<div class="post-metadata">

### Author: ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)
#### Post date: [December 19, 2024, 9:19pm UTC](https://community.glideapps.com/t/sorting-line-items-for-docsautomator/78699/2 "2024-12-19T21:19:21Z")

</div>

Hi Rupert, you could use a query column to sort the line items in the data editor.

---

<div class="post-metadata">

### Author: ![Rupert](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rupert/32/44178_2.png) [@Rupert](https://community.glideapps.com/u/Rupert)
#### Post date: [December 19, 2024, 9:33pm UTC](https://community.glideapps.com/t/sorting-line-items-for-docsautomator/78699/3 "2024-12-19T21:33:52Z")

</div>

That was it. Thanks a lot, @Hassan_Nadeem !

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [December 26, 2024, 9:34pm UTC](https://community.glideapps.com/t/sorting-line-items-for-docsautomator/78699/4 "2024-12-26T21:34:11Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
