Skip to Content
avatar image
Former Member

webi prompt with and without leading zeros

Hi,

We have Account dimension object of length 10. But Actual account has 7 digits only, so it store the data with leading zeros in data base(eg. if account is 1234567 then it will store as 0001234567 in db). I am using ltrim() on Account at universe level.

We have prompt on 'Account', so when user enter '1234567' then it is working fine. But when user enters 0001234567 then displaying no data. So issue is, it should accept when user enter Account with or without leading zeros.

Any suggestion please..?

Cheers,

Kranthi.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 31, 2016 at 04:14 PM

    Instead of using left trim(), try to convert the object to number (given the condition the account number are numeric). If this is the case, converting to number will automatically remove the leading zero's and you can also use the same object as a prompt.

    You don't have to worry if user gives the value with or without leading zeros.

    Try it out. See if that helps :)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 02, 2016 at 11:09 AM

    Hi Kuldeep,

    Thank you,

    I have tried with changing object to Number, but no luck, still it is not working when user enters with leading zeros.

    If I convert object to number then it will 'display' without zeros in report. But in database it self values are stored with leading zeros, so I think we should use ltrim() for Account object. so that sql will generate like.... ltrim("Account", '0')="0001234567". But still it is not working as we are passing value with leading zeros... I am expecting any workaround that it should work when user enters with leading zeros and without zeros (ie 0001234567 or 1234567)

    Thank you,

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2016 at 12:24 PM

    I don't think so you can achieve with single prompt LOV's. you have to choose one option either with zero's or without zero's.

    Add comment
    10|10000 characters needed characters exceeded