Question
Accenture
SG
Last activity: 27 Oct 2022 3:40 EDT
How to compare my result 1 to 2 and 2 to 3 then remove pagelist according if duplicate
Hello,
i would like to use an data transform or maybe an run activity where i want to check for result in pagelist where if there is a same description in my 1 and 2 it be removed
Below is the scenario
I am currently comparing the description if there is same description it should be removed and not add to it and so fore
I have try many like deletedobject but it couldnt work as what i am comparing is i using
.SecondaryCitizenshipList(<CURRENT>).Description == .SecondaryCitizenshipList(<CURRENT>).Description
Not sure how can i compare can anyone help me with this given in the picture above ?
***Edited by Moderator Marije to add Capability tags***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
DXC
AU
@Tingw16594322 you can use the function pyremoveduplicateinpagelist function, which uses page list and the property on which it will check for a duplicate.
Accenture
SG
Hi i have put this in my data transform but it dont work i can somehow still add same description into the list
NCS Pte. Ltd
SG
Hi @Tingw16594322: Solution suggested by @gasharma should work. If you are not able to resolve it, can you share your configurations masking confidential data?
Can you also share how you are adding the list data? Is it via UI and you expect to validate duplicate? If so, you can make use of isinpagelist function too. If the values are sourced from a list, please check if multiselect control will solve your problem.
Thanks.
Updated: 25 Oct 2022 2:29 EDT
Accenture
SG
Currently what i have is a data transform where i count if length of the page is greater than 3 then it cant be add, while apply data transform is my append that add to the pagelist
Currently i not sure and i doing correctly for my set
Param.RemoveDuplicates = @removeDuplicatesFromList(pyWorkPage,"SecondaryCitizenshipList","Description")
then i append to a new list ?
This come from a auto complete field where if i add to a list it be added to the list
This is the auto complete field where SecondaryCitizenship property is call .SecondaryCitizenshipItem The list is call .SecondaryCitizenshipList
NCS Pte. Ltd
SG
Hi @Tingw16594322: What i could see is as below. Correct me if my understanding is wrong.
- You are removing duplicates on SecondaryCitizenshipList which is the source for auto complete
- Then the data from SecondaryCitizenshipList is added to NewSecondaryCitizenshipList ( i assume this is the source for the table below the auto complete
- You expect if you add duplicate data, it should not get appended to the table below the auto complete
If this is the use case: You can achieve this with a simple multi select. If your requirement is to have the similar UI as shown in the screenshot, then i would suggest to use isinpagelist function to check if the value selected in auto complete is already already available in the table below. If yes, exit.
If you want to use removeduplicate function, it should be after your append to NewSecondaryCitizenshipList and the duplicates should be removed from NewSecondaryCitizenshipList. (step after append step and use the right page list)
Please let us know if this helps.
Thanks
Updated: 25 Oct 2022 4:48 EDT
Accenture
SG
- You are removing duplicates on SecondaryCitizenshipList which is the source for auto complete
- Then the data from SecondaryCitizenshipList is added to NewSecondaryCitizenshipList ( i assume this is the source for the table below the auto complete
- You expect if you add duplicate data, it should not get appended to the table below the auto complete
Yes, i am removing any duplicate on the SecondaryCitizenshipList that is added from auto complete
Then the data from SecondaryCitizenshipList is added to NewSecondaryCitizenshipList ( i assume this is the source for the table below the auto complete), no this is the list added from the autocomplete call SecondaryCitizenshipList
That is correct if i add any duplicate data, it should not get appended to the table below the auto complete
I have done a run activity that using pagelist to check if there is same duplicate it will display an error when @IsInPageList(.SecondaryCitizenshipItem,"Description",Primary.SecondaryCitizenshipList)
- You are removing duplicates on SecondaryCitizenshipList which is the source for auto complete
- Then the data from SecondaryCitizenshipList is added to NewSecondaryCitizenshipList ( i assume this is the source for the table below the auto complete
- You expect if you add duplicate data, it should not get appended to the table below the auto complete
Yes, i am removing any duplicate on the SecondaryCitizenshipList that is added from auto complete
Then the data from SecondaryCitizenshipList is added to NewSecondaryCitizenshipList ( i assume this is the source for the table below the auto complete), no this is the list added from the autocomplete call SecondaryCitizenshipList
That is correct if i add any duplicate data, it should not get appended to the table below the auto complete
I have done a run activity that using pagelist to check if there is same duplicate it will display an error when @IsInPageList(.SecondaryCitizenshipItem,"Description",Primary.SecondaryCitizenshipList)
now how i can prevent it for adding it since the error is showing it?
NCS Pte. Ltd
SG
Hi @Tingw16594322: Can you tell me the source property of the table below the auto complete?
Thanks
Updated: 26 Oct 2022 0:09 EDT
DXC
AU
@Tingw16594322 Try the following Param.RemoveDuplicates = @Utilities.pyRemoveDuplicatesFromPagelist(SecondaryCitizenshipList,"pxResults","Description")