A unique report number that starts over every year - InfoPath Dev
in

InfoPath Dev

A unique report number that starts over every year

Last post 11-11-2008 07:31 AM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-07-2008 08:30 AM

    • mjarrett
    • Not Ranked
      Male
    • Joined on 11-06-2008
    • Lansing, MI
    • Posts 8

    A unique report number that starts over every year

    I am having a small issue in determing the best way to go about generating a report number. The basic format we have is 2008-0001, 2008-0002, etc. But then on January 1st (every year) we want it to start over 2009-0001, 2010-0001, etc.

    Any suggestions on the best way to do this? I thought about using the ID number, or creating a seperate list, but I am kind of stuck? Also, not opposed to writing code I just want some best practice ideas.

     

    Thank you for any support!

  • 11-08-2008 10:02 PM In reply to

    Re: A unique report number that starts over every year

    I would use a substring function to harvest the current year from today's date. Then use concatenate to create your file name.

    That way on 1/1 it will automatically take the new year.

  • 11-11-2008 04:37 AM In reply to

    • mjarrett
    • Not Ranked
      Male
    • Joined on 11-06-2008
    • Lansing, MI
    • Posts 8

    Re: A unique report number that starts over every year

    Thanks Clay. What they want is it to go from 2008-456, 2008-457, 2008-458, then 2009-001, 2009-002. If this is not easily doable then they said that's OK and not focus on it too much but I'm kind of a perfectionist. Thanks again for all your help! :)
  • 11-11-2008 07:31 AM In reply to

    Re: A unique report number that starts over every year

     

    I am not sure how you are generating you sequential number but you should be able to detect when the year has changed and reset it.

    If you look at previous numbers then again use a substring function to analyze whether the year has changed from the last saved and if so reset.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.