Posted: 14 Aug 2020 10:53 EDT Last activity: 6 Sep 2020 13:17 EDT
Compare two pagelists
I am having two pagelists PageList1 and PageList2 where the class definitions are same which means technically both are same but the run time values they hold varies. Now I want to compare these two pagelists in the following manner.
PageList1(1).Property1 to be checked with the PageList2(1).Property1
PageList1(1).Property2 to be checked with the PageList2(1).Property2
PageList1(2).Property1 to be checked with the PageList2(2).Property1
and if any of these values differ I need to set a flag
Would like to know if do we have any OOTB rules are available for this?
Also would like to know if there are any OOTB rules to compare two pages.
Hope I am clear with my requirement.
Any inputs on this would be of great help.
***Edited by Moderator: Pallavi to change content type from Discussion to Question, move from Pega Academy to Product***
To compare the pagelists : one of the activity available is pxCompareTwoPageLists
It's functionality is that it compares 2 page lists and determines the changes that have been made based on a specified property.
The caller passes in 2 page lists and the property that is to be referenced on each page. The page then iterates through the two pages and compares the properties looking for the differences between the two.
Two comma delimited strings of the differences are returned.
To compare the pages : pxComparePages activity is available.
This activity is used by user interfaces to show the differences between two pages. Use the activity pxComparePagesByKey if you have the pzInsKey of two records to compare.The extension point pyGetInstanceLabel can be used to customize how the page names are shown on the returned Result page.
Basic comparison can be done with the OOTB rules, for any requirement need to do the loop for comparison accordingly.
Posted: 1 year ago
Posted: 6 Sep 2020 13:17 EDT
Gireesh Vetsa (vetsg)
Senior Technical Solutions Engineer