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     Conditionally adding Conditions to report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Conditionally adding Conditions to report
 Login/Join
 
Gold member
posted
Can I include where condition based on the user entered i/p?

WHERE ( DIR_ITEM_MSTR.PARNT_ITEM_F EQ 'Y' )
AND ( DIR_ITEM_MSTR.MRCH_PUBL_F EQ 'Y' )
AND ( ITEM_TYPE_MSTR.ITEM_TYPE_T EQ 'Sellable' )
AND ( CATG_TMPL_ATTR.STAT_C EQ 'R' )
AND (IF &DETAIL EQ 'ALL' THEN (CATG_HDR.CATG_I EQ &SpecifiedTemplate))
AND (ITEM_CATG.BUS_UNIT_C EQ &BusinessUnit)
AND (ITEM_TYPE_INFO.PUBL_DEST_C EQ &PublishDestination);

If detail is All, the I want to add filter criteria on CATG_I.

Can I do it?

Otherwise I may need to repeat the code by changing the where condition.
 
Posts: 77 | Registered: December 22, 2004Report This Post
Platinum Member
posted Hide Post
I would do this the following way.

-IF &DETAIL NE 'ALL' THEN GOTO NEXT;
WHERE CATG_HDR.CATG_I EQ &SpecifiedTemplate)) ;
-NEXT
WHERE ...
 
Posts: 226 | Registered: June 08, 2003Report This Post
Gold member
posted Hide Post
-IF &Detail NE 'ALL' THEN GOTO -NEXT;
WHERE ( DIR_ITEM_MSTR.PARNT_ITEM_F EQ 'Y' )
AND ( DIR_ITEM_MSTR.MRCH_PUBL_F EQ 'Y' )
AND ( ITEM_TYPE_MSTR.ITEM_TYPE_T EQ 'Sellable' )
AND ( CATG_TMPL_ATTR.STAT_C EQ 'R' )
AND (ITEM_CATG.BUS_UNIT_C EQ &BusinessUnit)
AND (ITEM_TYPE_INFO.PUBL_DEST_C EQ &PublishDestination);

-NEXT
WHERE ( DIR_ITEM_MSTR.PARNT_ITEM_F EQ 'Y' )
AND ( DIR_ITEM_MSTR.MRCH_PUBL_F EQ 'Y' )
AND ( ITEM_TYPE_MSTR.ITEM_TYPE_T EQ 'Sellable' )
AND ( CATG_TMPL_ATTR.STAT_C EQ 'R' )
AND ( CATG_HDR.CATG_I EQ &SpecifiedTemplate)
AND (ITEM_CATG.BUS_UNIT_C EQ &BusinessUnit)
AND (ITEM_TYPE_INFO.PUBL_DEST_C EQ &PublishDestination);


This is what I tried. But I receive the following error message "0 ERROR AT OR NEAR LINE 307 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR"


After applying conditional where, I want to execute the remaining statement like formatting, etc.

Guide me how can I do it?
 
Posts: 77 | Registered: December 22, 2004Report This Post
Virtuoso
posted Hide Post
I'm not sure what is giving the numeric error to you however, what version of FOCUS are you using, In our WebF 4.3.6 the length of amper variables names is limited to 12 and I noticed you have a longer one if I am counting correctly.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Gold member
posted Hide Post
Got it fixed.

Syntax what I was using in the previous code was incorrect.
 
Posts: 77 | Registered: December 22, 2004Report 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     Conditionally adding Conditions to report

Copyright © 1996-2020 Information Builders