Wrong part numbers listed in Select Part Number

 Product(s):Promis.e, Bentley Substation
 Area:Component Management
 Subarea:Parts Database

Problem Description

When assigning a part number to a device, some of the part numbers listed on the Select Part Number dialog do not match the filter, and some part numbers that should be listed are missing.


In a particular case, the default filter was cleared and changed to "Part Number like ABC*", but the resulting list did not include two recently added part numbers beginning with "ABC" while it included two part numbers that did not begin with "ABC". These non-matching part numbers appeared in the list where the two new part numbers should have, if sorted alphabetically. When the same filter is applied in the [[Parts Database Manager]], the results are correct. Using Show Differences did not help. Same problems occurred in a brand new project. Creating and using a new parts database path did not help.

For this particular case, when the parts database was opened in Microsoft Access, the OID field contained duplicate values even though the data type for the field is AutoNumber. The value in the OID field for part numbers that appeared incorrectly in the Select Part Number dialog matched the value for the respective part numbers that
incorrectly did not appear.

Steps to Resolve

AutoNumber fields cannot be renumbered. To correct duplicate values in the OID field use the following process:

  1. Make a backup copy of the parts database. The active parts database can be determined by clicking the Edit button for the Parts database path field on [[Setup]] > System Paths.
  2. Open the database in MS Access.
  3. Open the table used for the parts database, typically the parts_database table.
  4. Switch to the Design View.
  5. Find the OID field and note the field properties.
  6. Delete the OID field.
  7. Create a new field named OID with the Data Type set to "AutoNumber" and with same properties as the original.
  8. Save and close the database.

 Original Author:Matt_P

Keywords: 39522, 500000066121