Hi fireblaster,
what do you mean "filter out"? Earlier you wrote "prevent the same value in the column from showing up".
You also wrote "it keep inserting the same value of ID"
I think it would be good if you could share a bit more details about your scenario. What's "it"? How is this data created and where?
Unique indexes are the standard way to prevent duplicates - not only in AX but in databases in general.
I warmly recommend that you stick with the logic of the standard application, this way it's easy for the users to understand how things work. Users can try to insert duplicate records, and they will see an error if they try to do so.
It's up to the user (or your code, depending how the data is created) to handle the error or check for duplicates. The target table's responsibility is to prevent duplicates from being inserted, by throwing an error.