8 Replies Latest reply: Jul 15, 2016 8:18 AM by Marco Oberti RSS

    Create unique id with the master calendar

    Marco Oberti

      Hello everyone! I'm here with another question ...

      I've looked everywhere on the forum but have not found a solution.



      my goal is to create a unique id connected to the master calendar.



      I need:

      - A self-generated based on calendar month and year (no day)

      - Or: a complete calendar that you are creating, creates an id for each month + years.



      what I mean?



      auto generated id: (date starting on 01/01/2015 and ends 31/07/2016)
























      The id should not be repeated during creation, so if January 2015 was 31 days, I would not repeat the id 201 501 31 times, but only once.



      If you can not tie this id to the calendar, you just can generate this id automatically from a date.



      can someone help me?



      The expression I use to create the id is this:


      Num(year(TempDate),'0000') & Num(month(TempDate),'00') as UNIQUEID;


      thanks to those who can help me!