Question
Centene
US
Last activity: 17 Jul 2017 15:43 EDT
File attachments - limiting the number allowed in a category?
Hello, everyone - I've got the following set up
- custom Attachment category, availability of "File" set up on this rule
- a flow action/section where the user can upload files
I would like to know the following
- Is it possible to limit the number of attachments of this new category that are allowed? I'd like them to be able to attach other documents, as long as they don't choose this particular attachment category?
Thanks!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hi Jim,
You can specify security settings on the Attachment Category rule to restrict certain operations based on a privilege or a When rule.
Here is a link to the Help file with the details.
https://community.pega.com/sites/default/files/help_v717/procomhelpmain.htm
Centene
US
Carissa,
Thanks. After reading the help article you referenced, I'm still confused. I am not seeing how to do a When rule that allows this type of attachment, only if one is not already present on my case?
Pegasystems Inc.
US
Hi Jim,
Here is an example I tried in Pega 7.1.7. Would something like this work for your scenario?
In my Attachment Category rule I added a FileLimitWhen condition for creating attachments.
In the When condition I used an expression as my condition. I am checking the pyAttachments list to see if the pyCategory field contains the value "File".
@(Pega-AppDefinition:Utilities).PageListContains(tools, pyAttachments, pyCategory, File, false)
The expression should return true if there is a file attachment so I set my logic string to !A.
Centene
US
Carissa, thanks. This is very detailed, which is what I need. However, I must be doing SOMEthing wrong, as when I get to the point where I have one of my files attached, the entire drop down for "file category" is totally gone - not disabled, but gone as in not appearing on the screen,
Thanks again,
Jim
Pegasystems Inc.
US
Hi Jim,
In my test scenario, the File category will only appear when there are no File attachments; otherwise, the option does not appear in the dropdown. I am not sure how to show it in the dropdown but have it disabled. Maybe someone else will have feedback on that.
Centene
US
Carissa
No, what I mean is, after initially adding my new category, the dropdown shows
File
My New Category
Which is fine. What I'm trying to do is prevent selecting "My New Category" on a 2nd attachment. When I put in my fat-fingered version of your suggestion, on the 2nd attachment, I don't even see a dropdown control. It's not disabled, it's not even showing on the screen at all.
Pegasystems Inc.
US
Hi Jim,
I am not sure why the dropdown control disappears completely. What rule are you using for adding the attachments? I also found another function that could be used in the When rule. The library is WorkUtilities and the function name is pxIsAttachmentOfCategoryInCase.
Centene
US
Carissa,
I'm using the "pzAttachFile" Flow to handle the attachments. And I have not over-ridden that with a local copy.
Pegasystems Inc.
US
Hi Jim,
Were you able to get this to work? I see Carissa has provided several good examples for you to use. If you are still having a copy, I would provide screen images to highlight your requirement and the issues you are encountering.
Centene
US
Kip
I gave up on trying to get this to work. The screen just completely hung when I tried doing this. Thanks