Generate a composite key from a list of fields