Select attachments from case

Is there a way we can select attachments from the list of uploaded attachments and send via email?

Example:

We have 3 attachments in the case. Out of those if we want to select only 2 while sending an email from Pega. Is there any UI configuration or any other way to achieve this in constellation?

Hello @Ramesh_Reddy_Battini

Surely you can do that.

If it’s from the activity, you should be looking up to the case attachments and parse through them based on your conditions and populate matched attachments in the .pyAttachments pagelist while sending the email.

You can have a look at the below post for more information

If you want to manually select the attachments from the UI, maybe you set up a local action on the case, where you can show the case attachments as data reference table for selection and in the post processing you can take those attachment keys to populate them when sending the email in .pyAttachments as mentioned above.

Hope this helps

Regards

JC

1 Like

Hello @JayachandraSiddipeta

Thanks for your response.

I figured out a way how to do it in Pega constellation with some tweak.

Good that you have figured out the way to display the list. You may want to share the information here so that people who are looking for a similar kind of requirement will be benefitted.

Appreciate your time taken for this.

Regards

JC

1 Like

Glad you’re able to find the solution.

I hope you created a EmbeddedData (PageList) with 2 properties (IsSelected - Checkbox Property, UploadAttachment - Attachment Property ) to accomplish this solution.

1 Like

yeah, and then updating the PageList with attachments from case in pre processing of the view. Updating like PageList.Attachment.

the problem here is if user opens this view and upload an attachment from attachment widget in utility pane, it will not be updated in the pageList which is in case view.

Embedded would work but I would suggest using a Data Reference. This is designed for this use case - show me a list of objects and allow me to select on or more (multiple record). It also means the object selected is added to the field, and easier to reference in the future (than trying to take it from embedded list where checkbox and attachment are not implicitly linked).

Stealing the image from Constellation Cheat Sheet (which @Kamil_Janeczek borrowed from me) :

@Ramesh_Reddy_Battini are you in the User Experience Expert Circle? I would like to move this to there, so it can be seen alongside other Constellation and UX questions. However, if I do move it you wouldn’t have the ability to comment (until you join) - so let me know if you are and I’ll move it.

1 Like

Hello @MarcCheong

The problem here is I can’t get Attachment(Link-Attachment) as data object in the list while field creation as it is not our app specific. And I don’t want to maintain a new data object in our app to store all the attachments from the cases :slight_smile:

I’m in the circle, please move.

ah I see. That we can fix.

It would appear that this class has not been built with Constellation in mind, given it predates Constellation I can see why. We commonly had this with some OOTB classes like work groups, operator etc. back in '8.8 days (I remember raising these).

If you want to enable them with data references, then the class needs to adhere to certain principals.

Once I did this, I can refer to this as a Data Reference:

I’d expect this should work OOTB, will be raising the feedback (FDBK-141452) for this class to be more Constellation friendly.

1 Like

Hey @MarcCheong

:white_check_mark: Attachment object as a Data reference worked after doing the above suggested fix.

Also, With the use of Data reference I got the option to refresh the table from table actions once the user add file in utility pane. This table refresh option is not available when I used embedded.

Thank you for your time :slightly_smiling_face:

1 Like

yes :clap:

On the other actions, they are linked to Constellation - again linked to Queryable datapages, without them the Constellation features do not work. Glad this is fixed, please mark as “solved” to help others in future if this is the right solution for you.

@MarcCheong I don’t have an option to mark it as solved.

you do now. This was originally posted as “User Experience Knowledge Share”, these are outlining knowledge, so thus have no solution to a question. I’ve moved it to “User Experience”, so its a question, that what it can have a solution. :slightly_smiling_face: