Getnextwork not considering the dynamically calculated values for sort order.
Need to customize GetNextWork List view to sort by pxUrgencyAssign which should be calculated dynamically. For this purpose, I modified the pxurgencyassign OOTB declare expression. But the list view does not compute the calculation per the declare expression, it is instead sorting by the pxUrgencyAssign value fetched from the database.Tried to set it in the organize tab too but didn't seem to work. Is this requirement supported in GNW ? If not, how do I make GNW consider a dynamic requirement where the calculations always need to be based on current date time?
Example : pxurgencyassign for 3 records is I-1 -- 70, I-2 -- 60,I-3 -- 30. The pxurgency assign declare expression computes the value to be current time - (.property1) and sets it as I-1 -- 37,I-2 --42, I-3 -- 13. I need it sorted as I-2, I-1 and I-3. Instead I see the GNW sort order as I-1,I-2,I-3.
(The platform version is 7.3.1.)
***Edited by Moderator: Pallavi to change category from General to Product and add product version***
Are you talking about the worklist display or the code that runs when you click a get next work button and have a work object assigned to you? Either way, after you get the data from the database, if you need to alter the values, you should be able to do that. I don't believe any of the GNW rules are final, so you should be able to trace the bit you are focusing on and see what's being called. Then create custom versions with your additional logic. It may be a bit more complicated if you need to do the sort in flight, vs doing it in a direct query of the database, but that challenge shouldn't be insurmountable. If you are dealing with a significant amount of data, I'd worry about the potential performance impacts, though.
If you are talking about the display of a list of work, where the value you want to sort on is changing dynamically, you will need to figure out how best to refresh the list when the order changes, or else someone who's been sitting on the screen for a long time won't have the latest order.
Thank you for taking the time to respond. I was talking of the GNW functionality. I agree that GNW provides a lot of options to customize, and also, I was able to finally solve this problem by introducing an obj-sort at a later point. The issue was that the list view wasn't behaving as given in the documentation.
Either way, after you get the data from the database, if you need to alter the values, you should be able to do that. - Yes I can, but I was misled by the documentation for list view which stated that -
Select Ascending, Descending, or No Sorting to control whether and how this property affects sorting the rows of the report.
Sorting that is specified in this field occurs within the database software and uses sort algorithms provided by the database software vendors. In unusual cases, the sort sequence might not match your needs. Additional sorting can occur later on the Pega Platform server, as specified in the Organize tab.
. Additional sorting which can later occur on the pega server can be specified on Organize tab. I did exactly that, but it doesn't seem to consider the declare expression associated with pxurgencyassign property and calculate the value and sort by it. Interestingly, pxurgencyassign already has an OOTB declare expression which works just fine. it's only when I customize the Declare Expression that I observe this discrepancy. The so-called sorting on the Pega Platform Server doesn't get fired, all it considers is the value pxurgencyassign was in the DB.