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     NODATA, DEFINE not working?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
NODATA, DEFINE not working?
 Login/Join
 
<NewB>
posted
Apologies if this is a newbie question...

I'm trying to get the value for &&cbNone to show up where no data is returned.

Tried these to no avail...

SET NODATA = &&cbNone
SET NODATA = '&&cbNone'
SET NODATA = '&&cbNone.EVAL'

Tried these permutations of DEFINEs ...
D_OPTION1/A50 = IF &&option1 EQ '' THEN '&&cbNone' ELSE &&option1;
D_OPTION1/A50 = IF &&option1 EQ ' ' THEN '&&cbNone' ELSE &&option1;
D_OPTION1/A50 = IF &&option1 IS MISSING THEN '&&cbNone' ELSE &&option1;

Does anyone know how to make this work? TIA




We want to display ‘None’ (from &&cbNone) when &&option1 and/or &&option3 is blank or null.

I’m not sure how to test for that … EQ ‘’ does not seem to work.
 
Report This Post
Virtuoso
posted Hide Post
Did you intend to use the global variable '&&' rather than the variable '&'?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
Have you tried the GT option. See below.

D_OPTION1/A50 = IF &&option1 GT '' THEN
&&option1 Else '&&cbNone';


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
<NewB>
posted
Yes I did. My company is just now switching to WF from another product. There is a custom-made language-translation function built into our database, so we have to set and use globals to get the word in the right language.
 
Report This Post
Expert
posted Hide Post
Try - IF &&option1.EXISTS THEN .....

T



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
Master
posted Hide Post
Since you are using global variables, put a ? &&
in the top of your program and put a -EXIT after it. It will tell you what variables are active and what the values are.


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
Virtuoso
posted Hide Post
Pat has already alluded to the possiblity of a bad &&cbNone value, so I'll ask where that variable is set - is it in a server profile, calling fex, etc.?

You can't test the value of &&option in your DEFINE because if the value is missing, you get an error when it tries to replace the variable name with a non-existent value. You also can't use the EQ MISSING for variables like you can for fields.

My suggestion would be something like the following:
-*-SET &&option1=zero;
-DEFAULT &&option1=DEFAULT
-SET &cbNone=IF &&option1 EQ 'DEFAULT'  THEN 'BLANK'  ELSE '&&option1.EVAL';
SET NODATA = &cbNone

TABLE FILE CAR
PRINT
     CAR
ACROSS COUNTRY
END


If the value for &&option1 has been previously set the DEFAULT value is ignored and it uses the &&option1 value. If it is missing, a DEFAULT value is assigned but still handled properly.

I avoid using missing parameters as much as possible by always setting a DEFAULT value and testing that value rather than testing to see if it is unassigned/non-existent/missing


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     NODATA, DEFINE not working?

Copyright © 1996-2020 Information Builders