# PDF Using Template sort the records

**URL:** <https://community.fibery.io/t/pdf-using-template-sort-the-records/6626>\
**Category:** Get Help\
**Created:** [September 11, 2024, 3:10pm UTC](https://community.fibery.io/t/pdf-using-template-sort-the-records/6626 "2024-09-11T15:10:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fahd](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/fahd/32/9617_2.png) [@Fahd](https://community.fibery.io/u/Fahd)\
**Post date:** [September 11, 2024, 3:10pm UTC](https://community.fibery.io/t/pdf-using-template-sort-the-records/6626/1 "2024-09-11T15:10:28Z")

</div>

Hi,  
Is there any way to sort order of table records by specific coulmn when create the PDF , Such as if i want the records of table invoices sorted by DuDate field

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 11, 2024, 4:17pm UTC](https://community.fibery.io/t/pdf-using-template-sort-the-records/6626/2 "2024-09-11T16:17:44Z")

</div>

You’d need to use a bit of JS in the template:  
[https://the.fibery.io/@public/User\_Guide/Guide/Markdown-Templates-53/anchor=Using-Javascript-code-and-Fibery-API-in--b13b30fe-ef56-40c4-9ae3-cacfe6ba9598](https://the.fibery.io/@public/User_Guide/Guide/Markdown-Templates-53/anchor=Using-Javascript-code-and-Fibery-API-in--b13b30fe-ef56-40c4-9ae3-cacfe6ba9598)

---

<div class="post-metadata">

**Author:** ![Fahd](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/fahd/32/9617_2.png) [@Fahd](https://community.fibery.io/u/Fahd)\
**Post date:** [September 11, 2024, 6:21pm UTC](https://community.fibery.io/t/pdf-using-template-sort-the-records/6626/3 "2024-09-11T18:21:53Z")

</div>

Thank you , I will try it
