AnsweredAssumed Answered

Project ID autonumbering with XOG in GEL

Question asked by msnizek on Aug 28, 2014
Latest reply on Feb 2, 2015 by montapas123



I need to create projects from instances of our custom object and I need them to be autonumbered.


Here on Community I found this thread:


And I tried solutions written in there:

Unfortunately the Autonumber tag does not work for the Project. Why? i do not know.

What i have done in the past is to get the next value from the cmn_autonumbering_schemes table. The issue is that this only gets you the last one, and does not update it for you.

There is a stored procedure that you can run to get this value as well.

this is the query that gets you the next id change the object code to project, and partition code to whatever it might be


SELECT next_value



AND object_code = 'project'

AND attribute_code = 'code'

AND partition_code = 'NIKU.ROOT'


This is the SP that populates the next value for you in that table (change the partition code if needed)

CMN_AUTONUM_GET_NEXT_SP 'project','code','NIKU.ROOT','','','',0,get_seq_num

if you are on Oracle, you could write a function that returns the out value from the SP (this is the safest way to do it).

Hope this helps.


This query returnes the value of ProjectID but it's still the same.


I also tried to call the procedure, but I was not successful


Please do you have any idea how to solve it?