Numbers formating....

JAYESHJAYESH Member Posts: 290
Hi Experts...

I created Number Series for Purchase Order.
The No on the Purchase order shows me like 0000000000000001

I want to format this No. and want to show like 1.

Is there any property by setting this its converts..

Thanks in Advance..

And Wishing you a Very Happy New Year..

Thankx...
JAYESH PATEL

Comments

  • SavatageSavatage Member Posts: 7,142
    edited 2008-01-02
    Remember it's called Number Series but they are really type CODE not integer.

    "I want to show Like"........ Show Where? in a report on the form?

    How about converting it to text & removing all the leading zero's.
    -for a report

    I guess your prepared to make a lot of PO's :lol:
    0000000000000001 to 9999999999999999
    15 zeros brings you into the Quadrillion zone
  • JAYESHJAYESH Member Posts: 290
    Ok..but my question is

    It is possible to conver ?
    from 00000000001 to 1 ??
    JAYESH PATEL
  • JAYESHJAYESH Member Posts: 290
    edited 2008-01-02
    Thanx
    JAYESH PATEL
  • Alex_ChowAlex_Chow Member Posts: 5,063
    JAYESH wrote:
    Ok..but my question is

    It is possible to convert ?
    from 00000000001 to 1 ??

    Take a look at the EVALUATE function. It's what you're looking for.
  • SavatageSavatage Member Posts: 7,142
    EVALUATE(VarInteger,"Purchase Header"."No.");

    Trivia note: Even if you enter a new po every second it will take you 31,645,570 years to use up all your po numbers.

    Give or take :mrgreen:
  • jreynoldsjreynolds Member Posts: 175
    If you want to maintain the data as a CODE or TEXT look into the DELCHR function.
  • BeliasBelias Member Posts: 2,998
    jreynolds wrote:
    If you want to maintain the data as a CODE or TEXT look into the DELCHR function.

    newstr := delchr('010101010101','=','0');
    ....not really good....

    you must delete only useless zeroes...you have to read the code char by char (from left to right obviously) deleting zeroes until you find a character <> '0'...
    at this point if you want to mantain the same fieldtype is easier to evaluate and reformat the code.... :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kinekine Member Posts: 12,562
    Use
    newstr := delchr('010101010101','<','0');
    

    and it will be better... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • BeliasBelias Member Posts: 2,998
    yessss... :D
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.