Different Sequence Number for different Classification

Hi Team,

I have a scenario where in I need to generate different document sequence number - for Document Number field based on classification.

Ex : Class structure - Subtype - Class A - AXXX0001, Subtype - Class B - BXXX0001, Subtype - Class C - CXXX0001 - All these classification have different form configured and each form has Document Number field. Accordingly created respective custom properties with datatype - sequence and added datasource.

Is it possible to achieve generating sequence number without custom code? Kindly suggest. I am facing issue with configuration - while saving document, it shows all sequence numbers concatenated at header as 'Keyed_Name' which is not valid.

I am able to generate different sequence number based on classification by custom code added under server events - OnBeforeAdd.

Thanks,

Sowmya

    

Parents
  • Hi Sowmya

    I don't think so it is possible without custom code. I use below onBeforeAdd event to generate different sequence number

    string classification = this.getProperty("classification","");
    string item_number = this.getProperty("item_number","");

    if(string.IsNullOrEmpty(classification))
    {
    return innovator.newError("Please Select Classification");
    }
    Innovator inn = this.getInnovator();
    string sequenceName = "";
    switch(classification)
    {
    case "Class A" :
    sequenceName = "Sequence A";
    break;
    case "Class B" :
    sequenceName = "Sequence B";
    break;
    case "Class C" :
    sequenceName = "Sequence C";
    break;
    }
    string nextSeq = Convert.ToString(inn.getNextSequence(sequenceName));
    this.setProperty("item_number",nextSeq);
    return this;

Reply
  • Hi Sowmya

    I don't think so it is possible without custom code. I use below onBeforeAdd event to generate different sequence number

    string classification = this.getProperty("classification","");
    string item_number = this.getProperty("item_number","");

    if(string.IsNullOrEmpty(classification))
    {
    return innovator.newError("Please Select Classification");
    }
    Innovator inn = this.getInnovator();
    string sequenceName = "";
    switch(classification)
    {
    case "Class A" :
    sequenceName = "Sequence A";
    break;
    case "Class B" :
    sequenceName = "Sequence B";
    break;
    case "Class C" :
    sequenceName = "Sequence C";
    break;
    }
    string nextSeq = Convert.ToString(inn.getNextSequence(sequenceName));
    this.setProperty("item_number",nextSeq);
    return this;

Children
No Data