How can I count the number of Items in the worklist for each operator?

I need to create a function which calculates the total number of items in a users worklist. This is so that, if the number of items in a users worklist exceeds a specified number (pre-defined in DSS), then they will not be able to request any new cases, however if the number of items in their worklist is less than this number, then they will be able to request new cases.

Using Pega 8

***Edited by Moderator: Pallavi to update platform capability tags***


Keep up to date on this post and subscribe to comments

April 12, 2019 - 4:25am


Well I think there are different approaches. It depends, is it for an admin screen? Do you have to drill down on assignments or just to display a count? 

Of course you could work with multiple Report Definition or you could query all this with DB directly maybe.

April 12, 2019 - 4:29am

Please use this (getCurrentWorklist) activity to get the list  by passing the user id

now now find the size of the myWorkListPage page list, so you will get the list count 

April 12, 2019 - 4:09pm
Response to teegu

Tested to run Assign-Worklist.getCurrentWorklist activity by passing the User ID from the drop down and able to see the total count in myWorkListPage.pxResultCount property.

April 14, 2019 - 5:03pm

1. You can count no. assignment for each operator by creating reporting definition on Assign-Worklist class grouping it with pxAssignedOperatorID and aggregate  using count function

2. To restrict operator to request new cases beyond some threshold use data page to load data for no. of assignment that particular operator have ( Data source for data page can be same report as mentioned above with extra filter for current requestor id Data only). We can compare count on data page to DSS on transaction where we want restrict current operator to request new cases.




August 6, 2019 - 10:11pm

Is there any way I can display this count of open assignments against My Worklist?

Eg- In outlook/any email - it displays the number unread items. The same way, can we display this number in a brackets beside My Worklist?


October 7, 2019 - 1:59am
Response to Satyakanth

Hello Satyakanth,

Have you achieved this functionality. I have the same requirement. I am trying with pyOpenCount property but not able to concatenate this with "My work".
Appreciate if you can share your experience on this.
Thank you