The Biotics 5 application prevents more than a single value to be marked as a Primary indicator (i.e. Primary Reference) - if one value has the Primary indicator and the user selects the Primary field for a different value, the Primary indicator is de-selected from the original value. Allowing this functionality, however, means that this cannot be controlled by a constraint within the database itself. Which means that although the application prevents duplicate Primary indicators for a given field within a given record, the database does not. So, SQL update/insert statements run on the database will allow you to assign multiple Primary indicators for a given record. As of 5.9.1, the application will display an error preventing you from saving a record with duplicate Primary indicators within a given field for a given record. 


Attached is a file containing multiple queries to be run in Query Builder to detect such duplicates. Duplicates encountered by the queries can be updated in the record identified by the query within the application or by writing update SQL statements.