It'd be great if we could use a regular expression for this but you can use:
ToInt() to trim the leading zeros
and then convert it back to a string using ToString() if you need it as a string.
ToInt("00040567098") yields 40567098
ToString(40567098) yields "40567098"
You could get back to a string in one step by: ToString(ToInt(variable))
Of course this only works with the example strings you provided because the strings are composed of digits.
------------------------------
Dan Fontaine
Altivon
------------------------------
Original Message:
Sent: 12-05-2019 04:42
From: Samuel Polgar
Subject: Left Trim 0's from a string in architect
Dear PureCloud
Wishing you are well.
I have a variety of numbers that can return from a data action. For example
00006789
00678678
000678678
The first number will always start with a 0, and there may be more than one 0. There will always be a number after 0, which is where I want to start the new string.
Does Architect have a function to cater for this, please?
#ArchitectureandDesign
------------------------------
Thanks and regards
Samuel Polgar
CVT (Global) Pty Ltd
------------------------------