Question
Check duplicate in a Pagelist based on two properties
HI,
My requirement is to identify duplicate in a list based on two properties.
I have pagelist(QuantificationFactorList). It has four attributes in a Page
1. ID
2. Value
3. Suffix
4. Measure.
I am showing this List in a grid on UI.
So basically I have dynamic grid where i can add same Quant Factor ID/Name multiple times but i have to do property-set-message /page-set if same quant factor IDs has same measures too.
That means for a Quant factor added twice, it should have different measure else throw message.
Please suggest me how to do it. In case JAVA is required how can we do that as I do not know JAVA
***Updated by moderator: Lochan to update platform capability***
you can use findPageList api based on entered ID, it will return ArrayList of same IDs, then convert the ArrayList to ClipboardProperty then use countInPageList on ClipboardProperty based on measures , if count >1 then duplicate measures entered for that id.
Ex:
ID1 Mesure1
ID2 measure2
ID1 Measure3 Assure after third row user added below row i.e ID1 Measure1
ID1 Measure1
Now use my above explanation ....
first send the list to findPageList by ID1, it will return arrayList with three items like below
ID1 Mesure1, ID1 Measure3, ID1 Measure1
first and third have the same measure. we need to find it by using the countInPageList api
Now use the countInPageList based on measure property. Measure1 is repeated two times and count returns 2. which is >1, then you can say its duplicate mesure for same id.
let me know if you have any questions.