Posted: 16 Feb 2018 8:58 EST Last activity: 22 Feb 2018 9:28 EST
How to get Attachment Count using pzAttachmentsCount control to update properly?
For our requirement, we need to have the Attachment Count display and update next to a label that is one section above (the parent section) for where we are able to attach new attachments. The section that contains the attach functionality already has a field that stores the pzAttachmentsCount control and works properly within that section. In the parent section, when we add attachments to a case, it still only updates the control within the attaching section itself and doesn't update when I add in the pzAttachmentsCount control to the parent section.
Both sections are in the same class (Work- class) and use the pzAttachmentsCount control in the same exact way (nothing different per each usage of the control). I have also set up the pages & classes the same way for both sections. The only difference that I can see is that the control within the section where we add attachments has that exact functionality whereas the outer section is a holder for the "attaching" section. Is it possible for this pzAttachmentsCount to be used in the parent section? I was also thinking about trying to store the count from the child "attaching" section onto the clipboard and displaying it in the parent section by referencing that clipboard property. Would be great to hear some thoughts on resolving this issue.
***Edited by Moderator Marissa to update categories***
Attaching an image of what I am trying to accomplish below. We have the attachments count displayed within our Case Info section at the bottom of the screen. From the screenshot, you can see the Manual Attachments section allow us to attach files to a case. Within that section we previously had the attachments count by using pzAttachmentsCount control (this is where the (1) is). We have a requirement to put the count in the label Attachments (where the (0) is). I have set up the pzAttachmentsCount control in the label exactly the same way it was set up in the Manual Attachments Section, the only difference is the section that has the label is in a different ruleset than the Manual Attachments section.
Posted: 3 years ago
Posted: 22 Feb 2018 9:28 EST
Carissa Wenhardt (CarissaW_GCS)
Principal Software Solutions Engineer
I tried some options on my 7.2.1 system. I wasn't quite sure how to use the control in the label so I just set up a declare expression for my testing. I think the issue you might be encountering is that the tab layout is not refreshed.
I ended up creating a separate section called CaseTabs for my tab layout group. I then added the CaseTabs section to my pyCaseContent section and configured the below refresh condition. In my case the declare expression was setting the AttachmentCount property.