How do I check for duplicates under a parent?
Hello,
How could I check for duplicates (children) [Item Number] under a parent [123456]? Note: All parents will be a unique number value, but the Item Numbers will often be the same/repeat across the parents. I need this to check for duplicates under each parent.
Best Answer
-
This will currently check the column that it is in. If you want it to check a different column you need to put that column name in the children() with an @row reference. Example below
=if(count(Children([Column 1]@row))> count(distinct(children([Column 1]@row))),"Duplicate Submission")
Answers
-
=if(count(Children())> count(distinct(children())),"Duplicate Submission")
This should do what you asked. You can duplicate this with an or if you want to check more than one column, or just drag the formula across the parent row.
-
How would I tell this what column to check under the parent?
-
This will currently check the column that it is in. If you want it to check a different column you need to put that column name in the children() with an @row reference. Example below
=if(count(Children([Column 1]@row))> count(distinct(children([Column 1]@row))),"Duplicate Submission")
-
I like this solution! I wouldn't have thought to use the DISTINCT function for comparison like this.
-
@Paul Newcome Thanks, it's taken me a while to get used to the *new* formulas and really think about how dynamically they can be used, but i'm starting to feel comfortable with them. So long as my fingers don't type faster than my head and make small errors lol
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!