Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Drag and Drop attachments-Default Category is not set



On Pega 7.1.8, user has a portal where they use out of the box functionality to add attachments. 

When the user adds an attachment by dragging a file, the file is uploaded but the Category Dropdown is not set according to the file selected. They do not have the default value "File" in the dropdown for Drag and drop. 

Error Messages

Not Applicable.

Steps to Reproduce

1) Open any work object.
2) Go to Attachments tab, click on "Add" link. A popup appears to drag and drop a file.
3) After the file is dropped, the Category is not defaulted to any value which used to work in Pega 7.1.6.

Root Cause

As part of backward compatibility, “Select..” placeholder is present in the dropdown. So by default, if "File" option is unchecked, "Select" will be shown.


The user requires to use the following local-change:

1. Create a wrapper activity called "SetDefaultAttachmentCategory" in your ruleset. From this activity you can either call pzInitAttachContent activity in the first step of this activity or add the Page-New step which is in pzInitAttachContent. Then Set a property pyAttachmentPage.pyCategory to "Test2" or whatever value you want to set.

2. Add an entry in Pages & Classes tab of this activity with  ‘pyAttachmentPage’ as page name and class as ‘Data-WorkAttach-File’.

3.) Open "pyAttachContent" flow action and override pyAttachContent flow action and configure the newly created activity in the above steps as pre-processing activity.

Note:  While overriding pyAttachContent flow action and updating the pre-processing activity, one can notice the parameters that are getting cleared for post processing activity. Ensure the AttachPage parameter exists in the Post-Processing activity while saving.


Published October 1, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us