Err. I misread the code.  It inserts based on type, not based on the fieldsEntry.  My bad.