There’s a requirement to change the sorting in the attachments list in the Attachments widget. I’ve made the changes in D_AttachmentList OOTB D page and it’s source, but didn’t work.
Any suggestions?
There’s a requirement to change the sorting in the attachments list in the Attachments widget. I’ve made the changes in D_AttachmentList OOTB D page and it’s source, but didn’t work.
Any suggestions?
Hello @Madhumi_Munasinghe
Even if you update the available DPage /RD rules, the default sorting is setup in the internal DT rule after the results are fetched as shown below,
So unless, pega provides an extension point to customize the sorting logic, you will see the attachments sorted by the created time desc.
If you still wanted to show the attachments in a specific sorting order then you can create your own Tab on the case with a data reference table populated with the case attachments, if there is a strong business requirement for it to exist. You can apply grouping, filtering and other table features as well for better user experience.
Hope this helps
Regards
JC
Hi @JayachandraSiddipeta Thanks for your quick response.
Actually I don’t want this in a separate tab.
So do you mean as of now we can’t change the existing sorting logic in Pega as per our requirement?
Yes, till whatever i have noticed, that’s what it seems to be.
However, let’s hear from others as well if they have anything encouraging.
Regards
JC
extend Post load processing data transform to add preferred sort logic on the Data pages D_AttachmentList or D_pxCaseRelatedContent
That’s a good point @Tharun1
Even though you extend the post load processing, there is a default sorting implemented on the UI component which always shows the up the latest uploaded attachment.
You can see that the response contains the custom sorted list applied in the post load processing in the network response, but on the UI it does not reflect the same.
Hence it looks like a default behaviour in constellation UI which cannot be altered at the moment to my best knowledge and practical verification.
Regards
JC
Yes exactly @JayachandraSiddipeta … I think some DX API is involved in this. So, as you mentioned earlier may be this be accomplished by a customized widget or something like that if I’m not wrong.
DX API response seems to return the custom sorted list as per the implementation in Pega infinity server. But when the information is rendered in the attachments component on the UI, there seems to be an additional default sorting.
As i mentioned earlier, you can create a data reference looking up to the attachments and display the table of attachments in a partial view and set up a tab on the case to view the attachments
Regards
JC