Using Text codes

DeepDeep Member Posts: 569
Hi,

I am unable to use text codes in number series with simple text. Can anyone help me how can I assemble the text codes given below with simple text to generate daywise number series including current month. The example of number series is -

A/January/0001, A/January/0002 , A/January/0003 and so on....
A/February/0001,A/February/0002, A/February/0003 and so on...

The text codes are (as we all know) -

%1 – The current day number
%2 – The current week number
%3 – The current month number
%4 – The current month name
%5 – The current accounting period name


Help me. :?
Regards,

Deep
India

Comments

  • DenSterDenSter Member Posts: 8,305
    From the No. Series form, click the Series button and select Lines. In there you add a line with "A/January/0001" as the starting number, "A/January/9999" as the ending number, and January 1 as the starting date. Then you enter a new line with "A/February/0001" as the starting number, "A/February/9999" as the ending number, and february 1 as the starting date. Repeat for the other months. I did something similar for a company that wanted a new series for each day. You could even write a processing only report to populate those lines.

    One little piece of advice though.... try to advise your customer to not use 'smart' order numbers. In the end, this is much more maintenance than it is worth. There are fields on the order header tables that you can use for filtering, grouping, etc. by using strong types field values, instead of concatenating the numbers and assigning meaningful values to bits of the order number.
  • DeepDeep Member Posts: 569
    Thanks Daniel. You are right but I was asking about the automated numbers using the text codes. I am aware of the method you suggested but it is manual.

    Since there are text codes available in the system, I just wanted to know if we can use them in generating the series automatically.
    Regards,

    Deep
    India
  • SavatageSavatage Member Posts: 7,142
    personally I think Daniel is right. Maintaining this # series of a long period of time will be a pain.

    It would be easier to create your code using
    %1 – The current day number
    %2 – The current week number
    %3 – The current month number
    %4 – The current month name
    %5 – The current accounting period name

    in a Reference field, external doc field or PO field or where ever you are using this.

    *if you are going to use month name cut it into the first 3 letters so it looks more uniform

    MonthName := FORMAT(TODAY,0,'<Month Text,3><Year>');
    * this will give you
    JAN07
    FEB07
    MAR07
    etc....

    adding <Day> give you day - see FORMAT in c/Side Help
  • DenSterDenSter Member Posts: 8,305
    You'll have to do some development either way, and going through standard text codes is not the right way to go about it in my opinion.

    Write a processing only report that populates the No Series Lines, that is by far the easiest/quickest way to do what you want.
  • DeepDeep Member Posts: 569
    Yes. I got it. Its better to fom month specific number series using starting date.

    Thank you both.
    Regards,

    Deep
    India
Sign In or Register to comment.