Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     HOW TO USE IF-ELSE STATEMENT IN FOCUS
Go
New
Search
Notify
Tools
Reply
  
HOW TO USE IF-ELSE STATEMENT IN FOCUS
 Login/Join
 
<beginner>
posted
Hi;

Here is my attempt:

DEFINE TABLE MYTABLE
..
..
IF 0 THEN
MYLINE1/A225='ORG1 ORG2 '|
'ORG3 ORG4';
ELSE
MYLINE1/A225='NEW1 NEW2 '|
'NEW3 NEW4';

END

but it throws me a syntax error. Any sugguestion?
Note: I put zero as condition coz I want to test if it goes to else part

waiting for help,

new focuser
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Try this:

DEFINE FILE MYTABLE
MYLINE/A225 = IF 1 EQ 0 THEN 'ORG1 ORG2 '| 'ORG3 ORG4'
ELSE 'NEW1 NEW2 '| 'NEW3 NEW4';
END
Doc.Ref.: Writing Conditional Expressions.

Regards,
Mikel

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Reply With QuoteReport This Post
<beginner>
posted
Thank you very much for your help.
It took me a few hours to figure that out ~> Frowner

I'll be visiting this site with more questions soon.

See you all again.

Big Grin
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     HOW TO USE IF-ELSE STATEMENT IN FOCUS

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.