Find out , if you can get the MICR number. It is unique for every branch of the bank. May be you can then concatenate MICR and cheque number and store the same in the 'Assignment' field. Concatenating both will ensure that no more than same cheque numbers are available. It will then be easy for you to clear. This is just my thought and am eager to see other reply as well.
Regards,
Sridevi