Watch and learn: How to use user-defined formats to define data items