- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 12:03 AM
Hello,
I have a custom table and get the records created in one day and i would like to exclude the duplicates and get only unique records.
Ex - Table 1
User ID | Number | Status |
Mike | 1 | |
John | 2 | |
John | 3 | |
San | 4 | |
John | 2 |
Here John has 2 entries where User ID and Number are matching. I would like to get 4 Unique records excluding 1 record of John and update that record as Duplicate.
I tried to use "look up records" with the condition of created in one day and then "For Each" with Transform Function - Unique by Name or Number - Utilities transform functions to get the unique but not getting the result.
Any other ideas? Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 04:22 AM
Hi @Vinay52 ,
There is no OOB way to get unique records using Lookup records action. And, the utilities transform applies on array elements not on complex objects. One way is to implement a custom script to get the unique records or the flow designer itself, but the complexity will be O(n^n).
For example, I designed a simple flow for demonstration purpose, which finds the users and search for duplicates based on name and email fields.
1. Get all users created in last 24 Hours and active.
2. Iterate through each record.
3. Find all the records with same name and email ID using lookup action
4. If the records count is greater than 0 make other records in active.
5. Update the records to in active excluding the first record using for each and update record.
Mark this answer Helpful 👍/ Accept solution ✔️if helped you resolve your issue.
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 04:22 AM
Hi @Vinay52 ,
There is no OOB way to get unique records using Lookup records action. And, the utilities transform applies on array elements not on complex objects. One way is to implement a custom script to get the unique records or the flow designer itself, but the complexity will be O(n^n).
For example, I designed a simple flow for demonstration purpose, which finds the users and search for duplicates based on name and email fields.
1. Get all users created in last 24 Hours and active.
2. Iterate through each record.
3. Find all the records with same name and email ID using lookup action
4. If the records count is greater than 0 make other records in active.
5. Update the records to in active excluding the first record using for each and update record.
Mark this answer Helpful 👍/ Accept solution ✔️if helped you resolve your issue.
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 07:02 AM
Hello Anvesh,
How do i exclude the first record? Its making In active all records which are duplicate, I would want to exclude one record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 09:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 09:20 AM
Hey @AnveshKumar M ,
I have tried it already and seems If Duplicate Found is running for all matches and making all 3 records In Active.
Did it work for you?