0% found this document useful (0 votes)
24 views

Duplicate Check by Using DT

Uploaded by

A
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Duplicate Check by Using DT

Uploaded by

A
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Duplicate check by using Data transform

User Story: Managing Nominee Details


Description:
As a user, I need to input nominee details for a specific purpose. These details include
the name, relation, date of birth, percentage of share, and an ID upload. The system
should validate the input and provide appropriate error messages when necessary.

Acceptance Criteria:

1. Nominee Details Form:


o The user can access a form where they can input nominee details.
o The form includes the following fields:
▪ Name: The full name of the nominee.
▪ Relation: The relationship between the user and the nominee (e.g.,
spouse, child, sibling).
▪ Date of Birth: The nominee’s birth date.
▪ Percentage of Share: The percentage of assets or benefits the
nominee is entitled to.
▪ ID Upload: The user can upload an identification document for the
nominee (e.g., passport, driver’s license).
2. Validation Rules:
o If the user tries to submit the form without adding any nominee records,
display an error message at the screen level: “Please add at least one
nominee.”
o If the user enters duplicate data in any of the following fields (name,
relation, date of birth), display an error message at the screen level:
“Duplicate data added.”
3. Submission:
o When the user submits the form, the system should validate the input.
o If there are no validation errors, process the nominee details as required.
o If there are validation errors, display the appropriate error messages as
described above.
Solution:
Scenario:1

If the user tries to submit the form without adding any nominee records, display an error
message at the screen level: “Please add at least one nominee.”

To achieve this, we can check the length of the pagelist, if it is equal to 0, then we can
set a page level validation by using OOTB function “pxAddMessageToPage”.

Message rule:
Calling on Post-processing level on flow action.

Scenario:2

If the user enters duplicate data in any of the following fields (name, relation, date of
birth), display an error message at the screen level: “Duplicate data added.”

Let’s go one by one…

1. Check the Length of the Page List:


o Verify whether the page list has more than 0 entries. If it does, proceed to the
next step.
2. Set a Flag for Duplicates:
o Create a flag variable to keep track of duplicate entries.
3. Loop Through Nominees:
o Iterate through the list of nominees.
o Extract the necessary fields that we plan to compare for duplicates.
4. Duplicate Check:
o Use a function to count occurrences of each nominee in the page list.
o If the count is greater than 1, consider those rows as duplicates.
5. Page-Level Validation:
o If there are duplicate rows, set up page-level validation.
6. Data Transform on Post-Processing:
o Invoke this data transform during case submission, specifically as part of the
post-processing step in the flow action.

@Utilities.countInPageListWhen("CompareNominee",Primary.NomineeData)
@pxAddMessageToPage("DuplicateMsg",Primary)

………………………………………………………………………………………………………………………………………….

Calling this data transform, while submitting the case, that means calling on post
processing of the flow action.

Save, run the case


On click on submit button, post processing will run and triggers the DTF.

You might also like