Remove first 0 in number of 1-9

#1

Hi all,

I have a digit 09 and i want to remove 0 from this digit .when i tried it removed 9 not zero.
can you please give me the solution regarding this.

#2

Hi @Meenakshi6246

Check the attached workflow. It removes all the leading zeros in front.

RemoveLeadingZero.xaml (4.5 KB)

If this works for you, please mark the answer as the solution to help others as well :slight_smile:

3 Likes
Your XAML Solutions for most common issues (WIKI POST, anyone can edit)
#3

Hi @Meenakshi6246

If your variable is integer use absolute method(ABS) to remove the zero’s.
If variable is String use replace method to remove Ex. Variable.Replace(“0”,"")

Best Regards,
JothyPrasanth M :slight_smile:

#4

Thanks @Lahiru.Fernando its working fine. but i don,t know how to mark the solution.

#5

@Meenakshi6246 there is a small tick just below my answer on the top. Once you click on it it will turn green saying its the solution

#6

For myself, i prefer to convert this in int and write this one, witch mean if you’ve got something like 0010 you keep getting 10 in one assign
Value = CInt(Value).toString
Here the example Example.xaml (4.5 KB)

Use trim and other thing is a good option, but with the cint, i’m sure to not interfare with the real value of the string.

Your option to choose what solution is the best for you :slight_smile:
Regards,