OK - so each client will have their own unique reference either numeric or alpha numeric. Lets keep it simple and say it is numeric. So you have clients 1,2 and 3
This can be generated by using the same technique as before except that you would create the attribute in the SystemSettings BO so for each new client you generate a new unique id and INCREASE SystemSetting.ClientID by 1
So when either staff or client generate a new document, you create a unique ID for each document which is a combination of the client ID plus the document ID Each Client BO would have an attribute LastDocID which could be an auto increment attribute.
So to generate the Document ID it would be something like
Document.ID= Client.ClientID+'-'Document.LastDocID
The resulting Document ID would look like 1-1,1-2,1-3 etc and for client 2 they would be 2-1,2-2,2-3 etc
For staff I would generate the document from a process button on the client form
when a client generates a document It could be from a menu otion and the change would be
Document.ID= LoggedInClient.ClientID+'-'Document.LastDocID The "LoggedIn" prefix means they would use their own ID as the start of the document id.
Hope this helps