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     [SOLVED]Dialogue Manager If Statemend Error

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Dialogue Manager If Statemend Error
 Login/Join
 
Silver Member
posted
Hi all,

I am having an issue with the Dialogue Manager that I can't figure out.

As part of the report my users are entering a 1 or 0 to determine if specific records are included (1) or excluded (0) into a variable called &CRITERIA. I want to have both the value as a number and name and to accomplish this I have created another variable called &CRIT_NAME with the following set command.

-SET &CRIT_NAME = IF '&CRITERIA' EQ 0 THEN 'Exclude' ELSE 'Include';

For some reason no matter what I enter in criteria it is giving me Include in the &CRIT_NAME variable.

I am sure I am making some simple mistake and just cant see it but I would really appreciate your guys help.

Thanks,

-Luke

This message has been edited. Last edited by: <Emily McAllister>,


Web Focus 8105
Windows 7
 
Posts: 32 | Registered: January 13, 2014Report This Post
Guru
posted Hide Post
Try changing
-SET &CRIT_NAME = IF '&CRITERIA' EQ 0 THEN 'Exclude' ELSE 'Include'

to

-SET &CRIT_NAME = IF &CRITERIA EQ 0 THEN 'Exclude' ELSE 'Include'


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by RSquared:
Try changing
-SET &CRIT_NAME = IF '&CRITERIA' EQ 0 THEN 'Exclude' ELSE 'Include'

to

-SET &CRIT_NAME = IF &CRITERIA EQ 0 THEN 'Exclude' ELSE 'Include'


Thanks RSquared, that solved my issue.


Web Focus 8105
Windows 7
 
Posts: 32 | Registered: January 13, 2014Report This Post
Expert
posted Hide Post
The correct syntax is to include GOTO, so you should look at correcting the syntax incase code tightening causes you issues down the line ....

I'm sure that R² mistyped when missing the terminating semi-colon Wink

T

Edited to say that on rereading the post I realise that I had completely misread it so ignore my comment regarding GOTO Roll Eyes

Too busy is my excuse Music

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Luke,
You can also code:
-SET &CRIT_NAME = IF '&CRITERIA.EVAL' EQ 0 THEN 'Exclude' ELSE 'Include';  

and yes, do not forget the semi-colon!
But don't fret, it will happen to you often...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
You mean:
-SET &CRIT_NAME = IF '&CRITERIA.EVIL' EQ 0 THEN 'Exclude' ELSE 'Include';


Don't use .EVAL where it's unnecessary, it's a dangerous operation and it requires the code to be parsed twice.

For example, what happens when:
-SET &CRITERIA = '''; DEL *.*';


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [SOLVED]Dialogue Manager If Statemend Error

Copyright © 1996-2020 Information Builders