Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Inserting leading zeros
Topic Summary:
Created On: 12/20/2013 05:41 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 12/20/2013 05:41 PM
User is offline View Users Profile Print this message

Author Icon
ErichVon Massenbach
Apprentice (20-49)

Posts: 23
Joined: 11/09/2011

Is there a clean and robust way to insert or concatenate leading zeros into a string of numbers? I have a variable populated with a string of integers and would like to insert leading zeros. I am writing the contents of the variable to a file and was looking for a clean way in accomplishing this.

 Category Survey
 12/21/2013 11:23 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Erich,

Is there a set string length that you are trying to accomplish? The sample I have provided below assumes you want the string to be 7 characters long.

 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 12/23/2013 06:17 AM
User is offline View Users Profile Print this message

Author Icon
ErichVon Massenbach
Apprentice (20-49)

Posts: 23
Joined: 11/09/2011

Thank you so much!! That is exactly what i needed - the field length I need is 10 but that sample worked perfectly.

 Category Survey
 12/23/2013 06:31 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Erich,

We appreciate the follow up.

 Category Survey
AutoMate BPA Server 7 version:
Windows version:


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1859 guests browsing this forum, which makes a total of 1859 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog