Good morning, guys. Can you kindly help me check for duplicates using an IF statement, all the information is on one excel file name,surname and ID
@pabaleloh use remove duplicate Activity to remove duplicates
@chandreshsinh.jadeja I need to check if the record has been processed or not…will the duplicate activity work here?
if you want to check record has been processed or not then add one extra column “Status” and change the status whenever you completed the process for that record
and check the status of that if its not Completed that process that record
@chandreshsinh.jadeja where do i add the status?
It might be better you elaborate more on your use case in overall and in detail
When we model a duplicate check e.g. on a datatble we would do it more in all and not within a for each row loop
To check if the record is already processed inside for each row activity try this following steps,
Goto variable pane, create a variable ‘ProcessedItems’, of data type List. In the default value of the variable set it to new list(of string)
In the if condition, use the expression
ProcessedItems.contains(FirstName +““+SurName+””+IDNumber)
True/Then - already processed and added into list variable
False/else -
use an 'add to collection ’ activity, typeArgument should be string, collection should be ProcessedItems,
For item use,
FirstName +““+SurName+””+IDNumber
To add the item into list so that when the item comes again it will go to the already processed part where you could configure the required steps.
Hope this helps.
Thanks,
Gautham.
@Gautham_Pattabiraman Thank you i think this will work for me…i will keep you guys updated
Sure, try and let me know
add status column in the excel
Hi @pabaleloh ,
Attaching sample of that idea for your reference.
TestProcess.zip (9.0 KB)
Thanks,
Gautham
@Gautham_Pattabiraman thank you so much i was about to ask what to add on then and else as i am still learning UiPath
Happy to help let me know if you need any further assistance.
Hi @pabaleloh ,
If you had find the solution and its working fine. Please mark the response that helped you as solution to close this thread.
Thanks,
Gautham.
@Gautham_Pattabiraman morning i’m still working on this i will close it soon
Please take your time @pabaleloh , let me know if you need help .!
@Gautham_Pattabiraman thank you so much is working but i need clarity on str_ProcessedItems…what is it for?
If i remember correctly I am using it to save the concatenation of FirstName, surname and IdNumber and using the str_ProcessedItems in add to collection activity as an alternative for doing the concatenation directly in add to collection activity.
Just to keep the code clean I have used a string variable.
I am glad that the solution is working for you.
Feel free to ask if you have any more questions.
