Due to the need of a specific feature. When these types of documents are submitted, there will be fourt types. Each denoted by a specific unique identifier (within the DocType column), then each of the type has it's own unique ID (within the DocID column); a progressive series of values. What the form has to do is as the form is submitted capture the previous ID of the last entered document of that type, and increment it and append it to the submitting document as its DocID. That has to be done during the submit routine.
If I were to capture that ID and increment it when the form loads, then someone else who also opens the document to submit a new copy will end up duplicating the ID, 'poisoning' the DocID's. I need to capture and increment the value the moment the form is submitted just incase two of the same DocType's are being created at the same time.