Intelligent Automation & Macro Software  

Go Back   Tethys Solutions Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2008, 12:30 PM
bknfla bknfla is offline
Junior Member
 
Join Date: May 2008
Posts: 3
Default Checking variable for correct characters or numbers

How do you check a variable to see if it is correct, i.e; If variable has correct amount of numbers, like a phone number (???)???-???? or in our case we are creating a variable from a search on a created pdf document and want to make sure that the variable includes a 10 character number (if variable does not include ?????????? then...). Not sure how that is done. It is mentioned in your documentation however, I do not see an example. Is this done as a Variable Operation and if so how?

"If Variable"
This simple looking command is probably the most powerful of all conditional commands. Actually it is many commands in one. With this command you can perform hundreds of checks. For example if you have copied anything from an application or website and you want to check if what you copied matches certain text, or if it is a number, is it greater than or less than some other variable or fixed number. You can do that all with this command.


So can you give an example of how the text copied is not blank or actually has 10 digits in the copied text?

Thanks
Reply With Quote
  #2 (permalink)  
Old 07-01-2008, 04:14 AM
forumsupport forumsupport is online now
Senior Member
 
Join Date: Apr 2007
Posts: 524
Default

Hello,

Using 'If Variable' command, you can check if particular variable is blank. Text format of command would appear like this,

If $Phone$ Equal To "" Then
//Commands as per your requirement
End If

To check if particular variable has 10 digits or characters, please refer to attached task. Please copy VariableDigits.atmn under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Before running this task,
I) Create variable, $Phone$ through Variable Manager.

To create variable please follow below mentioned steps,
1. Go to Tools->Variable Manager in Automation Anywhere.
2. Click on “Add New Variable”.
3. From "Type" dropdown, select "Value".
4. In “Name” field, enter “Phone”.
5. In “Value” field enter any value say '0'.
6. Press “Save”
7. Press “Ok”

II) Copy text or phone number from required file or page.

Hope that helps.
Attached Files
File Type: atmn VariableDigits.atmn (4.7 KB, 5 views)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved