![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| 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 |
| |||
| 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |