cancel
Showing results for 
Search instead for 
Did you mean: 

Auto generated sequential number

ale_carraro
Champ in-the-making
Champ in-the-making
Hi,
I'm looking for something that should be supported out of the box, or just can be very easy to implement, because it is the most common use case for a Document Management System that I can think for

I'd like to write in a property (defined in a custom type or in a custom aspect) on node creation containing the max()+1 of its kind.
For example, if I insert a document of type X (or specialize an existing document) I'd like to have x.progressiveId = (number of documents of type X)+1 and the property should be unique.

Better, if I can put a partition value (for instance, the max()+1 should be implemented taking in account another property, for instance a property "year" so that 1st of January we can start again from 1)

Are there tutorials/best practices I can follow?

I've a rough idea of the path to implement it (use behaviors/store the current max() value in a node with known id) but if there is something 'ready' i would be much happier!

thanks to everyone
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
If you want the case like the variable which keep the track total number of documents uploaded in perticular space or like that?
If this is the case you need to create one simple content on which you apply your custom property and it should be incremented with each upload.
But if that is like wanted to keep number of time document is viewed or downloaded (content specific property).
Then you can go for behavior or policies.