Sequence number / serial number is not increasing in document code


 Product(s):ProjectWise Explorer Client
Version(s):10.00.02.96
Environment: SQL database, Windows Server 2012
Area: Document Code
Original Author:Arturas Zidonis, Bentley Technical Support Group

Problem Description

Creating new document and generating Serial number in Document Code it doesn’t increase the number and always generates serial number 0001 even if the document with this sequence number was created just now.

Of cause trying to proceed and create document with ‘0001’ sequence number it gives an error message Last Error [58132] Can not create document. Code is already in use.

The cause of this issue can be that one of the attributes length, that are in a document code, is too short. E.g. we have attribute ‘ASSET_CODE’ that length is only two symbols. That means in a database it will save only two symbols.

However, I can have a pick list ‘CAR | CNS | DEV | MAR’ with the values that have more symbols and in that case it will save only two symbols to the database for this attribute even though we might think it’s saved the value that we see.

When document code is generated we see that it have all three symbols CAR - ‘123-B-CAR-2DM-F-0001’. However next time when we will try to create new document and generate sequence number it will compare ASSET_CODE attribute ‘CAR’ with the one that is saved in a database ‘CA’. As it won’t match it will generate ‘0001’ as for a new doc code.

 

Solution:

Option 1. Change your pick list values or values in a look up tables so it had not more symbols that is defined in the database. (You can find what is the length of your attribute by exporting environment from ProjectWise Administrator to .aam file format and open that file with the Notepad application)

Option 2. Increase the length of the attribute in a database.