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] Difference Between _Foc_Null and Foc_None

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Difference Between _Foc_Null and Foc_None
 Login/Join
 
Gold member
posted
Hello,
If I do HTML document and use Ignore filter as FOC_NOne we get a different result when we use -FOC_NULL .
niha

This message has been edited. Last edited by: Kathleen Butler,


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Virtuoso
posted Hide Post
FOC_NONE causes the line of code to be ignored, as if that line were blank. The line need not be a WHERE phrase -- for example, it can be employed to eliminate a BY clause or a verb object.

_FOC_NULL forces a WHERE condition to evaluate as "True", regardless of the incoming data values.

Now is the report's behavior clear?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
hello,
We are trying to execute the following code to set report header but it is not working.
-IF '&ST_PROV_MXCSH_NA' EQ 'FOC_NONE' THEN GOTO ALLHDR;
-IF '&ST_PROV_MXCSH_NA' EQ '_FOC_NULL' THEN GOTO SUMMHDR;
-SET &RPT_HEADER = 'US TOTAL BY STATES';
-GOTO ENDHDR
-SUMMHDR
-SET &RPT_HEADER = 'US SUMMARY';
-GOTO ENDHDR
-ALLHDR
-SET &RPT_HEADER = 'US TOTAL ALL STATES';
-ENDHDR


THE FOLLOWING CODES WORKS FINE FOR THE REPORT
DEFINE FILE PVTFT001_COV_MO_FT ADD
ST_PROV_MXCSH_NA/A30=IF '&ST_PROV_MXCSH_NA' EQ '_FOC_NULL' THEN 'ALL' ELSE PVTFT001_COV_MO_FT.T8_PVTDM061_LOC_DM.ST_PROV_MXCSH_NA;
END
PLEASE SUGGEST
NP


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Guru
posted Hide Post
Could you please tell us, what you're trying to achieve?
Go ahead and try toggle between
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ '_FOC_NULL'
-*WHERE COUNTRY EQ 'FOC_NONE'
END


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
I suppose that &ST_PROV_MXCSH_NA is a parameter which is provided by a portal control field meaning that value/option can be selected such as "US Summary", "US Total All States" and "US Total By States".

As a simple way I will have that control define as a radio with three options (same as above) and where each of them have its own returned value (where it could be 1 = "US Summary", 2 = "US Total All States" and 3 = "US Total By States".

According to this, your code become:
-IF &ST_PROV_MXCSH_NA EQ 1 THEN GOTO SUMMHDR;
-IF &ST_PROV_MXCSH_NA EQ 2 THEN GOTO ALLHDR;
-SET &RPT_HEADER = 'US TOTAL BY STATES';
-GOTO ENDHDR
-SUMMHDR
-SET &RPT_HEADER = 'US SUMMARY';
-GOTO ENDHDR
-ALLHDR
-SET &RPT_HEADER = 'US TOTAL ALL STATES';
-ENDHDR 

DEFINE FILE PVTFT001_COV_MO_FT ADD
ST_PROV_MXCSH_NA/A30=IF &ST_PROV_MXCSH_NA NE 3 THEN 'ALL' ELSE PVTFT001_COV_MO_FT.T8_PVTDM061_LOC_DM.ST_PROV_MXCSH_NA;
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Because I have a tendency to focus on the wrong things...

Why are we using goto for this? the whole thing could be simplified into:

 
-SET &RPT_HEADER = IF &ST_PROV_MXCSH_NA EQ 1 THEN 'US SUMMARY'
- ELSE IF &ST_PROV_MXCSH_NA EQ 2 THEN 'US TOTAL ALL STATES'
- ELSE 'US TOTAL BY STATES'
 


You may now return to your regularly scheduled programming.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Virtuoso
posted Hide Post
In this case you are right Eric, the IF THEN ELSE will do the job.

But what if you would like to perform several actions according to each parameter's value ?
The GOTO may be the only solution...


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Thats assuming niha is doing multiple actions. I'm just going on what was presented in the example. That's all. Like I said... not really what the point of the thread is. Just a bit of a detour.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
Hi,

Thank you all for the suggestions, but we are trying without radio button. From the html doc we can select FOC_NONE for Ignore Filters, and add All & No Selection from the setting for the Listbox.

When you do that, it passes _FOC_NULL for 'No Selection' and FOC_NONE for 'ALL'. the report works fine, but we are trying to create a Header for three different options...

Can it be done without the radio button?


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Registered: April 01, 2011Report This Post
Member
posted Hide Post
Eric,

We tried the following also, but it does not work since it can not validate 'FOC_NONE'...

SET &RPT_HEADER = IF '&ST_PROV_MXCSH_NA' EQ '_FOC_NULL' THEN 'US SUMMARY' ELSE IF '&ST_PROV_MXCSH_NA' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' ELSE 'US TOTAL BY STATE';

We are trying to find out is there a way to identify the 'FOC_NONE' and code accordingly...

The -IF and -GOTO was just to try in a different way...


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Registered: April 01, 2011Report This Post
Virtuoso
posted Hide Post
Trying to test FOC_NONE (and either _FOC_NULL) is sometime a pain...

Try
SET &RPT_HEADER = IF '&ST_PROV_MXCSH_NA.EVAL' EQ '_FOC_NULL' THEN 'US SUMMARY' ELSE IF '&ST_PROV_MXCSH_NA.EVAL' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' ELSE 'US TOTAL BY STATE';


Using a radio may be an easy way, but you can do the same with list box, drop down, ... until the proper values are built in the control.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Martin,

That was great!!! I totally forgot about the .EVAL, thanks.

It works now for 'No Selection' and 'ALL' perfectly but does not work if I select one or mutiple states:

-SET &RPT_HEADER = IF ''California'' EQ '_FOC_NULL' THEN 'US SUMMARY'
- ELSE IF ''California'' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES'
- ELSE 'US TOTAL BY STATE';
0 ERROR AT OR NEAR LINE 86 IN PROCEDURE practice_covsel_001_ustotalsms_mainFOCEXEC *
(FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Registered: April 01, 2011Report This Post
Virtuoso
posted Hide Post
You have to trick it a bit such as:
-IF &ST_PROV_MXCSH_NA CONTAINS 'OR' THEN GOTO WITHOR;

-SET &RPT_HEADER = IF '&ST_PROV_MXCSH_NA.EVAL' EQ '_FOC_NULL' THEN 'US SUMMARY' ELSE IF '&ST_PROV_MXCSH_NA.EVAL' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' ELSE 'US TOTAL BY STATE';
-GOTO ENDSET;

-WITHOR
-SET &RPT_HEADER = 'US TOTAL BY STATE';

-ENDSET

I wrote it : "a pain..." Sweating


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
It all worked, just don't need the ticks...
-SET &RPT_HEADER = IF &ST_PROV_MXCSH_NA.EVAL EQ '_FOC_NULL' THEN 'US SUMMARY'
- ELSE IF &ST_PROV_MXCSH_NA.EVAL EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES'
- ELSE 'US TOTAL BY STATE';

Thank you all for the suggestions...good discussion..


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Registered: April 01, 2011Report This Post
Guru
posted Hide Post
At the end, all you need is just -SET &ECHO='ALL'; Wink


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report 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] Difference Between _Foc_Null and Foc_None

Copyright © 1996-2020 Information Builders