AnsweredAssumed Answered

Case Statement

Question asked by lmarcinelli on May 11, 2016
Latest reply on May 11, 2016 by user19752

In a script, can I use a case statement instead of a nested if?  For example:

 

if [ $WhichOne = 1]

          Perform Find

          Set Field

Else  if [ $WhichOne = 2]

          Perform Find

          Set Field

Else  if [ $WhichOne = 3]

          Perform Find

          Set Field

End if

End if

End if

 

___________________

 

Case $WhichOne of

1:  Perform Find; Set Field

2:  Perform Find; Set Field

3:  Perform Find; Set Field

end case

 

 

 

Thank you, in advance.

Outcomes