# Possible to sort across all pages of export?

**URL:** <https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476>\
**Category:** Integrator.io\
**Tags:** csv, sorting, page-size, ftp, javascript\
**Created:** [July 24, 2020, 4:42am UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476 "2020-07-24T04:42:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveklett](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@steveklett](https://connective.celigo.com/u/steveklett)\
**Post date:** [July 24, 2020, 4:42am UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/1 "2020-07-24T04:42:25Z")

</div>

Hello,

I have a flow that loads a CSV file from an FTP server. I do not have any control over the file or how it's generated. The sorting of the rows is incorrect and I need to sort it in IO. I added a preSavePage javascript function which works perfect on a page of results. The problem is when my data spans multiple pages, I can't sort across pages. I know you can increase the page size and I've done this, but there's a 5MB limit so this isn't a bulletproof solution.

My question: Is there a way in IO to combine pages or a hook/event to operate on all pages of results?

-Steve

---

<div class="post-metadata">

**Author:** ![courtneyjordan](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@courtneyjordan](https://connective.celigo.com/u/courtneyjordan)\
**Post date:** [July 24, 2020, 3:32pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/2 "2020-07-24T15:32:57Z")

</div>

Hi @steveklett,

Great to hear from you! Unfortunately, there's currently no way to handle this scenario, although we do have some concepts in the planning stage. Let me check with our PM on these, Vili, and get back to you. Thanks so much for letting us know about this need!

---

<div class="post-metadata">

**Author:** ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)\
**Post date:** [July 24, 2020, 6:24pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/3 "2020-07-24T18:24:47Z")

</div>

@steveklett

There is no alternative or a creative way in IO to sort file records that span multiple pages.

We have a feature backlog to sort file content to address your use case. I am gathering customer's feedback on how they plan or want to use this sort. Would you please explain what your flow scenario is and provide some examples of the file layout along with sorting rule.

Thanks

---

<div class="post-metadata">

**Author:** ![abhinavkaushal](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@abhinavkaushal](https://connective.celigo.com/u/abhinavkaushal)\
**Post date:** [March 27, 2021, 7:33pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/4 "2021-03-27T19:33:38Z")

</div>

Hi,

I have similar ask where I need to sort and then use group by on CSV so I can eliminate the duplicates from CSV. I was thinking of having a parent work flow which dumps the CSV and then next work flow will consume it and do group by. Looks like it won't work as for group by we need to sort the content.

Is there any global variable which has scope within integration and can ne written and called in various flows so it will eliminate the CSV dump and can be sorted out using JS?

Thanks,

Abhinav Kaushal

---

<div class="post-metadata">

**Author:** ![katelarson](https://avatars.discourse-cdn.com/v4/letter/k/91b2a8/32.png) [@katelarson](https://connective.celigo.com/u/katelarson)\
**Post date:** [March 30, 2021, 7:08pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/5 "2021-03-30T19:08:13Z")

</div>

Thanks for posting to the community, @abhinavkaushal. I’m checking with our experts and will get to back to you with their recommendation.

---

<div class="post-metadata">

**Author:** ![katelarson](https://avatars.discourse-cdn.com/v4/letter/k/91b2a8/32.png) [@katelarson](https://connective.celigo.com/u/katelarson)\
**Post date:** [March 30, 2021, 9:38pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/6 "2021-03-30T21:38:22Z")

</div>

@abhinavkaushal - I heard back from our engineers. We don't have any global variable that has scope beyond the current execution. All variables are passed in as arguments for the hooks or other function being called.

---

<div class="post-metadata">

**Author:** ![shrehith](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@shrehith](https://connective.celigo.com/u/shrehith)\
**Post date:** [June 8, 2022, 5:22pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/7 "2022-06-08T17:22:39Z")

</div>

Hello,

I am having the same issue. Do we have any solution developed to handle this scenario now?

---

<div class="post-metadata">

**Author:** ![martinjahn](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@martinjahn](https://connective.celigo.com/u/martinjahn)\
**Post date:** [October 19, 2022, 3:43pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/8 "2022-10-19T15:43:41Z")

</div>

Anyone have an update on this request?

We have source system that provides rows of data that need to be grouped before being sent to the destination system. We have a Pre Save Page script but unfortunately when Integrator IO splits the data set into Pages, it sometimes splits groups of records that should have been grouped together.

Current workaround is to import the raw data rows into a NetSuite custom record, then use a saved search and record grouping functionality from the Integrator IO Export from NetSuite functionality. This adds overhead as we need to write the custom records, then do an update to the custom record to either mark the rows as processed and/or delete the custom record entries.

---

<div class="post-metadata">

**Author:** ![bhavikshah](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/bhavikshah/32/8230_2.png) [@bhavikshah](https://connective.celigo.com/u/bhavikshah)\
**Post date:** [October 19, 2022, 4:07pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/9 "2022-10-19T16:07:11Z")

</div>

@shrehith @martinjahn - Thanks for posting to the community. We have grouping capability available on FTP connector. In our upcoming release, this feature will be extended to Universal HTTP and Database connectors.

[https://docs.celigo.com/hc/en-us/articles/360045238292-Export-files-from-an-FTP-server#groupSort](https://docs.celigo.com/hc/en-us/articles/360045238292-Export-files-from-an-FTP-server#groupSort)[](https://docs.celigo.com/hc/en-us/articles/360045238292-Export-files-from-an-FTP-server#groupSort)

---

<div class="post-metadata">

**Author:** ![bhavikshah](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/bhavikshah/32/8230_2.png) [@bhavikshah](https://connective.celigo.com/u/bhavikshah)\
**Post date:** [November 18, 2022, 1:20pm UTC](https://connective.celigo.com/t/possible-to-sort-across-all-pages-of-export/1476/10 "2022-11-18T13:20:23Z")

</div>

**UPDATE** : We recently released the support for Grouping. You can now group your source records for HTTP and Database connectors. Please follow this article to learn more about this :

[https://docs.celigo.com/hc/en-us/articles/4405373029019-Sort-and-group-records#Group](https://docs.celigo.com/hc/en-us/articles/4405373029019-Sort-and-group-records#Group)
