Skip to Content
author's profile photo Former Member
Former Member

How to Filter excess 0's in an Alphanumeric ID

Hi, experts

There is an account ID that leads with letters then goes to numbers. such as YDEP00001148595.

How can I remove the Zeros before the 5. I am trying to do this through a conversion file but the javascript js:parseInt(%external%) and it does not work. I am working on BPC 10.1 NW

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on May 21, 2015 at 04:54 AM

    Use substring!

    js:parseInt(%external%.toString().substring(5)).toString()

    Vadim

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 21, 2015 at 03:42 AM

    Hi

    If number of zero's and length of ID is fixed then use


    ACCOUNT=0GL_ACCOUNT(1:4)+0GL_ACCOUNT(9:15)

    Shrikant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 21, 2015 at 03:33 AM

    Hi,

    Is it a compounded info object?

    try split the ID first, then parseInt the number part, then join again.

    Andy

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.