Delete leading zero from string

Hi,
I get article number from SAP by an interface but with leading zero’s like following string : ‘000000000000038501’ how can I remove those zero’s ? so I get only the ‘38501’ string afterwards ?
I tried to use the expression of : TOTEXT(TEXTTOINTEGER(variable)) but I got the original string, I even tried to store in an integer variable the value of TEXTTOINTEGER(variable) but didn’t work.

Please help

Regards,
Amit Berku

Thats a thinker. Using the same exprression works for me; will delete the zeros from the string when putting it into an integer and putting back into string does not include the zeros. Might be a bug.

@Amit,

I think @chris.wartella might be right and you found a bug, Can you share a screenshot of your trigger that isnt executing correctly?

Pete

Hi Pete,
I did found a bug but in my own app, I did some research in my app triggers after opening this topic and found the bug the caused it, I chose a different variable by mistake, so the formula of TOTEXT(TEXTTOINTEGER(variable)) do work great !

Amit

1 Like