# Sorting case attachments

**URL:** <https://forums.pega.com/t/sorting-case-attachments/11614>\
**Category:** General\
**Created:** [April 20, 2026, 7:21am UTC](https://forums.pega.com/t/sorting-case-attachments/11614 "2026-04-20T07:21:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhumi\_Munasinghe](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Madhumi\_Munasinghe](https://forums.pega.com/u/Madhumi_Munasinghe)\
**Post date:** [April 20, 2026, 7:21am UTC](https://forums.pega.com/t/sorting-case-attachments/11614/1 "2026-04-20T07:21:40Z")

</div>

Hi, anyone knows how to sort the list of attachments in Pega?

I tried overriding Pega’s OOTB sorting by using the post activity pyProcessCaseRelatedContent, but still no result.

---

<div class="post-metadata">

**Author:** ![Somak\_Banerjee](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/somak_banerjee/32/7632_2.png) [@Somak\_Banerjee](https://forums.pega.com/u/Somak_Banerjee)\
**Post date:** [April 20, 2026, 7:49am UTC](https://forums.pega.com/t/sorting-case-attachments/11614/2 "2026-04-20T07:49:46Z")

</div>

Try overriding the sort logic within Report Definition - **pyGetAllAttachments** that is invoked from the data page \*\*D\_AttachmentList.  
\*\*  
I have tried this and it works for Theme Cosmos applications.

OOTB sorting is enabled on the attachment date/time so the recent most is on the top.

---

<div class="post-metadata">

**Author:** ![Madhumi\_Munasinghe](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Madhumi\_Munasinghe](https://forums.pega.com/u/Madhumi_Munasinghe)\
**Post date:** [April 20, 2026, 8:09am UTC](https://forums.pega.com/t/sorting-case-attachments/11614/3 "2026-04-20T08:09:15Z")

</div>

Thanks for your response.

But changes to **pyGetAllAttachments** RD didn’t help me.

---

<div class="post-metadata">

**Author:** ![Somak\_Banerjee](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/somak_banerjee/32/7632_2.png) [@Somak\_Banerjee](https://forums.pega.com/u/Somak_Banerjee)\
**Post date:** [April 20, 2026, 8:12am UTC](https://forums.pega.com/t/sorting-case-attachments/11614/4 "2026-04-20T08:12:45Z")

</div>

Can you trace while loading the attachment section to find which Data Page/RD gets invoked?

---

<div class="post-metadata">

**Author:** ![Madhumi\_Munasinghe](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Madhumi\_Munasinghe](https://forums.pega.com/u/Madhumi_Munasinghe)\
**Post date:** [April 20, 2026, 8:24am UTC](https://forums.pega.com/t/sorting-case-attachments/11614/5 "2026-04-20T08:24:11Z")

</div>

Yeah it’s D\_AttachmentList only. Should the RD changes be in a ruleset to reflect the changes? (I mean not in a branch)

---

<div class="post-metadata">

**Author:** ![Somak\_Banerjee](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/somak_banerjee/32/7632_2.png) [@Somak\_Banerjee](https://forums.pega.com/u/Somak_Banerjee)\
**Post date:** [April 20, 2026, 8:31am UTC](https://forums.pega.com/t/sorting-case-attachments/11614/6 "2026-04-20T08:31:52Z")

</div>

That is correct, the changes should be picked at run time and the results should be visible. Please trace during execution to check with version of the RD is being invoked.
