I was looking for an analogous way to how in Java you can compare two arrays, for example:
boolean b = Arrays.equals(array1, array2);
I know we have pxComparePages and I think that one is good for getting more in-depth details of the differences between two pages, but I wish there were a quick way to know if two page lists are the same. For example, in my use case I have two page lists: OperationalHours1 and OperationalHours2, I know ahead they will always have seven entries and start and end times, and I wish there is a straightforward way to know if they are the same, if not, I can log in the history that the “operational hours have changed”.
For a straightforward way to compare two PageLists in Pega you can use the pxCompareTwoPageLists activity. This activity returns two comma delimited strings of differences which can help you determine if the two PageLists are the same. If the activity does not meet your requirements you can loop through the PageLists and use the IsInPageList function to compare the values. This approach allows you to log any changes in the operational hours if the PageLists are not the same.
This is a GenAI-powered tool. All generated answers require validation against the provided references.