Record duplication from a custom widget

Next, I am goint to use this code to recognize formula columns: