Question
LTIMindtree
IN
Last activity: 8 Oct 2021 11:36 EDT
Copy Duplicate list of results from two page lists
I want to copy list of results to one-page list from two page lists
need expressions and activity steps
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 8 Oct 2021 11:36 EDT
Maantic
IN
lets consider list_id is the property in both the lists list1 and list2 which holds the unique value to determine duplicate.
here is the step I mentioned before:
2. loop over list2
set param.list_id = .list_id [here list_id is of 2nd page list]
2.1 use this function in your first embedded step when @IsInPageListWhen [pass list1 as pagelist and DuplicateFound as when]
in DuplicateFound when rule compare, param.list_id = .list_id [here .list_id is of list1 page list]
2.2 if above function returns true, do not copy , otherwise use simply page-copy to append record in list1.
now if you need more than one field to determine whether a record is duplicate or not, keep on adding them in the when rule as AND/OR condition, whatever suits your requirement.
IQZ Systems, LLC
US
Hi,
could you please expand your question.
You want to copy all duplicate results from 2 page lists to one page list right?
Or else
Want copy all results from two pagelists to one pagelist ?
-
Muna Pathan
LTIMindtree
IN
lest say 5 matching duplicate records in 2 page lists that 5 page results should copy in to one page list with 5 results
Ordina
NL
@vinodkumarv1 For copying the contents of two pagelists and removing duplicates, you could look at:
- For merging multiple pagelists into one, you could use Page-Merge-Into, see: https://community.pega.com/sites/default/files/help_v72/methods/page-merge-into/page-merge-into.
- For removing duplicates from a pagelist, take a look at the pyRemoveDuplicatesFromPagelist activity
Additionally, you can use a function like @countInPageList to check for duplicates if you're looping through a list in an activty or data transform.
LTIMindtree
IN
i want to compare 2 page list having with 10 results for each page that 2 page list having 5 comon page results that 5 pages should come in to one page list
Maantic
IN
If I have understood your requirement clearly, you have 2 page lists, say list1 and list2 and you want to copy data from list2 to list1 except the duplicate ones.
1. Create a when rule which returns true if 2 records are considered as duplicate. Say DuplicateFound
2. loop over list2
2.1 use this function in your first embedded step when @IsInPageListWhen [pass list1 as pagelist and DuplicateFound as when]
2.2 if above function returns true, do not copy , otherwise use simply page-copy to append record in list1.
-
Tanay Bal Bas Groeneveld Bhargav Veenem
Ordina
NL
@AvikMitra Seems like an elegant solution!
LTIMindtree
IN
what when condition to take in when rule to check duplicates
Accepted Solution
Updated: 8 Oct 2021 11:36 EDT
Maantic
IN
lets consider list_id is the property in both the lists list1 and list2 which holds the unique value to determine duplicate.
here is the step I mentioned before:
2. loop over list2
set param.list_id = .list_id [here list_id is of 2nd page list]
2.1 use this function in your first embedded step when @IsInPageListWhen [pass list1 as pagelist and DuplicateFound as when]
in DuplicateFound when rule compare, param.list_id = .list_id [here .list_id is of list1 page list]
2.2 if above function returns true, do not copy , otherwise use simply page-copy to append record in list1.
now if you need more than one field to determine whether a record is duplicate or not, keep on adding them in the when rule as AND/OR condition, whatever suits your requirement.