I have 3 attributes that could potentially have duplicates. A, B, C. After finding the duplicates, I have to make a decision on which ones to keep based on attribute D. The scenario is as followed: if A,B,C are the same, take the record where D is not null. If D is null for both records, take any one. If D both have values, take both unless the value in D is the same then take just one. Help!
Solved
finding duplicates then selecting one based on a value in another attribute
Best answer by erik_jan
If the features do not have a geometry, this could work:
Use an Aggregator, group by A, B, C, creating a list for all other attributes.
Use the ListSorter on D (to move the object with a D value to the top of the list).
Then use the ListIndexer (index 0) and ListRemover to keep the first object in the list.
If you do have geometries I would first use the GeometryExtractor to safe the geometry in an attribute and reverse that at the end using the GeometryReplacer.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.





