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     WILDCARD does not find record when field is blank

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WILDCARD does not find record when field is blank
 Login/Join
 
Member
posted
In my WHERE conditions I am entering a wildcard ($*) to pick up any value in the field. But when the field has no values, are blank, then no records are displayed.

Ex: WHERE (PGM_CODE EQ '&PGM_CD')
AND (PO_NUMBER EQ '&PO_NBR')
AND (PRIME_APPROVER_ID EQ '&PRIME');

There is always a PGM_CODE and PO_NBR but not always is there a PRIME. When the parameters are displayed I enter a value for PGM_CODE, a $* for PO_NBR and PRIME. But no records are displayed because there are records with blanks in the PRIME field.

Using the MISSING operator is not the approach because the user would not know if the field has values or not. What would be a better approach to address this issue?
 
Posts: 25 | Registered: March 15, 2006Report This Post
Expert
posted Hide Post
G, the more modern way of filtering for all values is FOC_NONE
(there is also a FOC_ALL but i'm a little fuzzy on the distinction)
Instead of entering $*, enter the word FOC_NONE.
Sounds a bit odd, i know, but its quite nice.
See if you get what you want.
And, do please edit your profile to put your setup details in your signature.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
As the default behavior when using FOC_NONE is to "internally" comment out the WHERE statement that contains it, I have found occasion that when using FOC_NONE with a compound WHERE, it ignores the whole WHERE statement if it finds a FOC_NONE. Haven't dug into it much, but it's just as easy to code them as separate WHERE statements and not worry about the issue.
Also, on a related note, I found that using 'EQ '$*'' has caused problem for fields that can be null because it excludes records with a null in the field - so it's probably best to start using the FOC_NONE.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
and, as Utah says,
$* won't work if the field is /A1
The test value '$*' is longer than the field value.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
quote:
Ex: WHERE (PGM_CODE EQ '&PGM_CD')
AND (PO_NUMBER EQ '&PO_NBR')
AND (PRIME_APPROVER_ID EQ '&PRIME');


Add a -SET for your last test:

-SET &CK_PRIME = IF &PRIME EQ ' ' THEN ';' ELSE
- 'AND (PRIME_APPROVER_ID EQ | '&PRIME' | ');';

then:

WHERE (PGM_CODE EQ '&PGM_CD')
AND (PO_NUMBER EQ '&PO_NBR')
&CK_PRIME


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thanks everyone, good stuff.

The FOC_NONE worked just fine. The actual code had several fields that required the same syntax and I was able to use it for all the prompts.
 
Posts: 25 | Registered: March 15, 2006Report 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     WILDCARD does not find record when field is blank

Copyright © 1996-2020 Information Builders