Page 1 of 1
want multiple operations executed in if condition
Posted: Wed Jul 02, 2008 12:25 am
by ahila
hai all,
i want to do multiple operations depending on If condition in a Transformer stage. what are the delimiters used in between the if... then... else constraint i tried to my level, can someone guide me ?
Posted: Wed Jul 02, 2008 12:30 am
by ArndW
The delimiters are spaces or, for formatting, you can use shift-return. IF condition THEN assignment ELSE IF condition THEN assignment ELSE assignment
Posted: Wed Jul 02, 2008 1:11 am
by ray.wurlod
Welcome aboard. There are no necessary delimiters. The entire If..Then..Else construct can be (and usually is) a single string.
Code: Select all
If test_expression Then expression1 Else expression2
The value generated by
test_expression (true or false) determines whether the result of
expression1 or the result of
expression2 is the overall result of the If..Then..Else expression.
Posted: Wed Jul 02, 2008 11:25 pm
by ahila
i want to assign 4 different values depending on a category. if i insert the second assignment in the first IF error occurs please help.
OR shall i use simple IF 's than nested IF conditions ?
Posted: Thu Jul 03, 2008 12:43 am
by ray.wurlod
There are no assignments. For example
Code: Select all
If (condition = 0) Then "A" Else If (condition = 1) Then "B" Else If (condition = 2) Then "C" Else "D"
The parentheses are not necessary; I included them only for clarity.