How to Create a Smart field