VTCSdude
24th May 2007, 17:48
Is there way in BaaN script to do an elseif in a if block?
mark_h
24th May 2007, 18:34
Whats wrong with an oncase statement? Maybe if you provide us with a sample of what you are looking for you might get a variety of solutions.
bdittmar
24th May 2007, 18:53
Is there way in BaaN script to do an elseif in a if block?
Hello,
do you mean something like this :
if <codition> then
do something
else
if condition_2 then
do something_2
endif
endif
Regards
sukesh75
25th May 2007, 14:05
What he is asking about, if i understand it right, is a vb like if-elseif-else-endif statement...
Would be interesting if this is possible in Baan scripts...
sk
kathuria
25th May 2007, 15:55
Hi,
I have not seen such kind of statement in BaaN script. You have to work with alternate option.
Regards,
sanjay
george7a
28th May 2007, 09:07
The best alternative option IMHO is the on case statement. Check the following links, they have good examples:
http://www.baanboard.com/programmers_manual_baanerp_help_3gl_features_string_expressions_on_case
http://www.baanboard.com/programmers_manual_baanerp_help_3gl_features_long_expressions_on_case
- George
Hitesh Shah
28th May 2007, 20:58
In short
1. The elseif construction is not available .
2. On case will suffice in most cases where = (equal to ) opertor is used in if / else if conditions . In cases where other operators such as < , > , <> , IN , like (not possible in baan) or many functions such as pos , rpos etc are used , likelihood of on-case being useful reduces .
3. In that case , if-else-if-else-endif-endif suggested by others is very useful and practical.