CA Service Management

  • 1.  Automatic sequence field

    Posted Jun 28, 2017 08:42 AM

    It is possible to create a field in sdm that is populated with an automatic sequencing number, like occurs with the ref_num field.

    I need a field with that caracteristic in the nr table



  • 2.  Re: Automatic sequence field

    Posted Jun 28, 2017 10:12 AM

    Hi,
    i think that functionality like this is not presented out-of-the-box, but this can be achieved using spel customization, if you're pretty familiar with it, algorithm could be:
    - publish new factory (db table), single attribute (ex: ref_num) should be enough;
    - register new method, for example call it: sequence_init, which should return incremented sequence number;
    - register new trigger for decided object (nr in your scenario) which will fire on new object;
    - simply call that method and assign returned value.

     

    calling new method instead of simple updating value in an outer factory should be more stable and shouldn't perform sequences conflict.


    Regards,
    cdtj