Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. 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 03-05-2009, 02:58 AM
maroblouna maroblouna is offline
Junior Member
 
Join Date: Feb 2009
Posts: 7
Default Conditionals using AND / OR

Hello

Is it possible to create complex conditionals using AND or OR clauses?
Quote:
example: if (CONDITION) or (CONDITION) then ...
The If conditional command GUI doesn't seem to have this kind of funcionality but I was just wondering whether it was possible in some other way.

Thank you in advance
M.
Reply With Quote
  #2 (permalink)  
Old 03-05-2009, 10:59 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

It is possible to check the complex conditions with Automation Anywhere.

For AND clause, insert nested If commands. The text format of commands would appear as follows,

If $Prompt-Assignment$ Equal To "A" Then
If $Prompt-Assignment$ Equal To "B" Then
Comment: Please enter the conditional commands here.
End If
End If

For OR clause, insert ‘ElseIf’ option of 'If' command. The text format of commands would appear as follows,

If $Prompt-Assignment$ Equal To "A" Then
Comment: Please enter the conditional commands here.
Else If $Prompt-Assignment$ Equal To "B" Then
Comment: Please enter the conditional commands here.
End If

Hope that helps. If you could tell us more about your case, we would be able to help you more with specific task.
Reply With Quote
  #3 (permalink)  
Old 03-06-2009, 03:06 AM
maroblouna maroblouna is offline
Junior Member
 
Join Date: Feb 2009
Posts: 7
Smile

Hello
Thank you for your answer, I have already used nested IFs or IF-ELSEIFs but it's not the same:

In case of AND the drag of nested IFS is only aesthetic & having to repeat the IF command, however when it comes to simulating an OR with ELSEIFs it's a whole problem because you have to repeat whole chunks of code for each ELSEIF:

Quote:
IF condition1
code chunk
ELSEIF condition2
the same code chunk
ELSEIF condition 3
again the same code chunk
ENDIF
Whereas it would be much cleaner just to have

Quote:
IF condition 1 OR condition2 OR condition3
code chunk
ENDIF
Anyway, thanks for your help.
Maybe AND & OR for conditionals would be a nice touch to future versions of AA!
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

BB 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 03:03 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved