# jFiles SaveFile sorting by a key

**URL:** <https://clarionhub.com/t/jfiles-savefile-sorting-by-a-key/8761>\
**Category:** questions\
**Tags:** json, tps\
**Created:** [November 6, 2025, 9:06am UTC](https://clarionhub.com/t/jfiles-savefile-sorting-by-a-key/8761 "2025-11-06T09:06:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![henkouwejan](https://clarionhub.com/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@henkouwejan](https://clarionhub.com/u/henkouwejan)\
**Post date:** [November 6, 2025, 9:06am UTC](https://clarionhub.com/t/jfiles-savefile-sorting-by-a-key/8761/1 "2025-11-06T09:06:14Z")

</div>

Hi all,

I'm using jFiles to export a TPS file to JSON. This process is sequential. I'm wondering if it's possible to do this by a key. Add a line somewhere in the code like SET(PRE:MyKey,PRE:MyKey)  
Suggestions are welcome.  
The reason for this is that the recipient requests it.

Regards, Henk

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [November 6, 2025, 5:09pm UTC](https://clarionhub.com/t/jfiles-savefile-sorting-by-a-key/8761/2 "2025-11-06T17:09:59Z")

</div>

Depending on the number of rows, it might be simplest to fill an intermediate queue that then goes to JSON. You can sort that queue however you want before export.

---

<div class="post-metadata">

**Author:** ![Rick\_UpperPark](https://clarionhub.com/user_avatar/clarionhub.com/rick_upperpark/32/346_2.png) [@Rick\_UpperPark](https://clarionhub.com/u/Rick_UpperPark)\
**Post date:** [November 6, 2025, 6:45pm UTC](https://clarionhub.com/t/jfiles-savefile-sorting-by-a-key/8761/3 "2025-11-06T18:45:46Z")

</div>

Create a VIEW on the table and set the Prop:Order for the view before using jfiles to export it.
