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     [CLOSED] WHEREIF Prompt two cases Equal/Not Equal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] WHEREIF Prompt two cases Equal/Not Equal
 Login/Join
 
Gold member
posted
New to Webfocus. A consultant set up a series of prompts in the Whereif section. We would like to simplify some of them, but not sure how to go about it. For one of them rather than having to go through a list and click on one or several items, would like to have the choice be Equal to Or Not Equal. Example the user would have a select box and the choices would be:

UG
GR

The WHEREIF would need to translate it so that if the user selected UG the WHERE clause would be = UG. If the user selected GR, the WHERE clause would be <> UG. In the above example, GR is a displayed value, as the actual list contains 6 codes.

Similarly, would also like to consider the option of UG, GR, or one of the individual items, if the user wanted to see only one particular group.

Here is the statement as it is now.
WHERE ( STUDENT_LEVEL EQ '&ST_LEVEL.(FIND STUDENT_LEVEL,STUDENT_LEVEL_DESC IN ADMISSIONS_APPLICATION).Student Level.' );

This message has been edited. Last edited by: Kerry,


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Master
posted Hide Post
Try this,

  
-PROMPT &ST_LEVEL.(FIND STUDENT_LEVEL,STUDENT_LEVEL_DESC IN ADMISSIONS_APPLICATION).Student Level.;

-SET &TESTER = IF &ST_LEVEL EQ 'UG' THEN 'EQ' ELSE 'NE';

.....here your orginal table....
WHERE ( STUDENT_LEVEL &TESTER '&ST_LEVEL');


Should do the trick..

First ask user voor &ST_LEVEL.
Based on that decide wether to use EQ or NE.

G'Luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Gold member
posted Hide Post
Thank you for your reply. I wasn't able to connect to webfocus yesterday as the server was down. I tried working with your code, but not sure where the -PROMPT and -SET lines go. I switched the view from REPORT to SOURCE and pasted the -PROMPT and -SET lines between TABLE FILE and PRINT. I then modified the WHERE statement per your example. I was unable to return to the Report view nor was I able to run the report by clicking on the blue triangle "Run" button. Below is partial code from the report painter.

TABLE FILE ADMISSIONS_APPLICATION
-PROMPT &ST_LEVEL.(FIND STUDENT_LEVEL,STUDENT_LEVEL_DESC IN ADMISSIONS_APPLICATION).Student Level.;
-SET &TESTER = IF &ST_LEVEL EQ 'UG' THEN 'EQ' ELSE 'NE';
PRINT
BIRTH_DATE
STREET_LINE1
BY PERSON_UID
HEADING
""
FOOTING
""
WHERE ( STUDENT_LEVEL &TESTER '&ST_LEVEL' );

--------------
Was I supposed to do this in the graphical environment, didn't know what Menu or Icon to click on to do this.

Thanks for your assistance.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report 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     [CLOSED] WHEREIF Prompt two cases Equal/Not Equal

Copyright © 1996-2020 Information Builders