Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problem with IF..THEN statements

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problem with IF..THEN statements
 Login/Join
 
Member
posted
Hi folks. I am trying to use an IF..THEN statement in a DEFINE that will allow me to store a different value in a defined field based on some parameters, however, I keep receiving the following error.

(FOC260) AN OPERATION IS MISSING AN ARGUMENT

Here is the piece of code it is erroring on...

CTN_VAL/P7.2=IF LOC_OH LE MAX THEN REPLPNT ELSE IF LOC_OH GT MAX THEN MAX ELSE LOC_OH;

From guessing, I'm thinking this is giving me a problem because I am trying to return a value of another field, other than a specific value such as IF LOC_OH LE MAX THEN '02';

So, I guess my question is, is it possible to do this? The LOC_OH field just contains a value that contains a quantity on hand, the MAX field contains a value we have stored in a FOCUS master file that represents the MAX number, and REPLPNT is also stored in that master file and contains another value. I know all of these fields contain values because I have tried printing them in the request and they all show up so it's not like I'm trying to pass a non value if that might be the problem.

So I basically just want this to return the values from the different fields based on my IF..THEN statement to the field CTN_VAL.

Any help on this would be wonderful, thanks!


FOCUS 7.3
 
Posts: 2 | Registered: June 25, 2008Report This Post
Expert
posted Hide Post
MAX is a 'reserved' word, i.e. a prefix operator. If you change this to something else, your code will work.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thank you! This solution worked.


FOCUS 7.3
 
Posts: 2 | Registered: June 25, 2008Report This Post
Master
posted Hide Post
Nice catch Ginny!


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problem with IF..THEN statements

Copyright © 1996-2020 Information Builders