How to get the list of fields and IDs