Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrew Davis 14 posts 36 karma points
    Aug 06, 2014 @ 23:27
    Andrew Davis
    0

    Auto Increment Datatype

    Hello all,

    I'm looking to have a datatype that auto increments a number each time you add new content. That number should be initially configurable. It should be able to have a starting value, how many characters (i want a number with 6 digits), etc...

    i.e.
    Content 1 has a # of 553071
    Content 2 has a # of 553072

    This number is then tied to that content. I want it to kind of act like the ID that gets automatically created. It is auto generated and the user can't change it. So when I create a new content it will automatically scan the current children and see what the next auto increment number is and apply it to the content.

    Is there something in Umbraco that does this natively or is there a plugin that I should look into? I consulted Google, Umbraco forums, and Umbraco projects but have yet to find anything of the sort.

    Server specs:

    • Running Umbraco version 7.1.4 assembly: 1.0.5261.28127
    • .NET Framework 4
    • Windows Server 2012 R2 and IIS 8.5

     

     

    Thank you for your help.
    Andrew
  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Aug 07, 2014 @ 01:17
    Hendy Racher
    0

    Hi Andrew,

    Sounds intriguing, what's use-case ?

    Every piece of content has a unique ID, or how about caculating it by ordering content by date then transforming it ?

  • Andrew Davis 14 posts 36 karma points
    Aug 07, 2014 @ 16:23
    Andrew Davis
    0

    Well, we are currently in the process of creating a knowledge base to go along with our site. We'd like each article to have a unique ID. I guess it would kind of work like Microsoft's support articles really to give you an example. I was just curious if anyone else has come across this need before for any reason.

     

Please Sign in or register to post replies

Write your reply to:

Draft