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: Getting first letter of string
Topic Summary:
Created On: 05/14/2013 05:04 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.
 05/14/2013 05:04 PM
User is offline View Users Profile Print this message

Author Icon
DylanLemoine
n00b (>6 posts)

Posts: 2
Joined: 05/14/2013

Hello.  Running Automate 6 here and new to the program.  I am trying to build a task and I want to get the first character in a 6 character string that is in a variable.  I have tried all the text stuff but I am still learning how to use expressions and such and I can't figure it out.

 

Basically I will have a variable

Ex: do876123

I want to populate another variable with the first character of that variable.  In this case it would be "d".

 

Thanks.

 

P.S. I would also like to know if it is possible to have an If Text Contains check a range of characters.

 

Ex:

If %TEXT1% Contains A-M then ...

If %Text1% Contains N-X then ...

If %Text1% Contains Y-Z then ...



 Category Survey
 05/15/2013 07:10 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Dylan,
the sample below could set yo in the right direction.
Notice I have included both upper and lower case in the test, although it was implicit by default.

 Category Survey
AutoMate 6 version:
Windows version:



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


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 05/15/2013 03:47 PM
User is offline View Users Profile Print this message

Author Icon
DylanLemoine
n00b (>6 posts)

Posts: 2
Joined: 05/14/2013

Awesome!  That's exactly what I want.  I'll post what I came up with if anyone else needs something similar.

 

 



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 05/16/2013 11:35 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Great, Dylan. You got it.

 Category Survey
AutoMate 6 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
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 2643 guests browsing this forum, which makes a total of 2643 users using this forum.

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

Sitemap Network Automation Software Blog