Behavior "Add" Button

Hi guys, 

I want to change the behavior of the "add" button.

I would like that before creating a new record in my table, it needs to check if it already exists, and if it is already create will update, if not create a new record.


Can any one help me?