Focal Point
GOTO

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2131009192

July 17, 2008, 01:15 PM
Donald
GOTO
about goto


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
July 17, 2008, 01:16 PM
Donald
I need to conditionally skip a where condition based on the previous where condition. Here is my code.
BY Customer_Name AS 'Customer/Name'
BY PARTNO
WHERE ( CO EQ '&iComp.EVAL' );
WHERE ( YM GE '&CURP.EVAL' ) AND ( EXTRACTYM GE '&CURPE.EVAL' ) AND ( YM LE '&NEXT5P.EVAL' ) AND ( EXTRACTYM LE '&NEXT5P.EVAL' );
WHERE (PLTCODE EQ '&PLANT');
WHERE (CUST EQ '&CUST') ;
WHERE (PC NE 'N0A10' OR 'N0A20' OR 'A0X01');
&CUSTNAME_IND.EVAL WHERE (CUSTNAME LIKE '&CUSTNAMEL.EVAL') ;
WHERE (PC EQ '&PC') ;
-IF &iComp EQ 'C' GOTO AAA;
WHERE (RBU EQ '&BU')
-AAA
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
I need to skip the check for RBU if the Company is 'C'


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
July 17, 2008, 01:28 PM
Danny-SRL
Donald,
Instead of:
quote:

-IF &iComp EQ 'C' GOTO AAA;
WHERE (RBU EQ '&BU')
-AAA

use:
  
WHERE (RBU EQ '&BU') OR (CO EQ 'C');



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

July 17, 2008, 01:29 PM
Gene F.
How about this
 WHERE ((CO NE 'C') OR ((CO EQ 'C') AND RBU EQ '&BU')) 



Gene


WF 8.009 on Windows Server 2012/IIS/WebSphere; client: Windows 7
July 17, 2008, 01:31 PM
Prarie
quote:
&CUSTNAME_IND.EVAL WHERE (CUSTNAME LIKE '&CUSTNAMEL.EVAL') ;


Not sure what that line is doing.

So what error are you getting here.

Also please update your signature in your profile as to what version you are on.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
If the CO = 'C' I can't have the prompt for RBU to display.


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
I updated my profile,sorry about that.


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
Are you talking about autoprompting? If so, I don't think that will solve your problem. WF will parse the fex looking for all unresolved variables. At that point, both iComp and BU are unresolved so they will both be prompted for, but they don't necessarily both need to have values supplied. Otherwise, your best bet is to create a customized launch page where you control all of the parameters and when/if they appear.

Code-wise, Daniel's WHERE statement using OR is your best bet.


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
Auto-prompting by WebFOCUS only happens upfront and so cannot be dynamic as you need. You may need a custom web page for users to provide the selection criteria, and in there have some javascript that dynamically makes the RBU/&BU input field appear/disappear as needed depending upon the company selected.


WF 8.009 on Windows Server 2012/IIS/WebSphere; client: Windows 7
Thanks everyone, and it was good meeting all of you in Nashville.


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
Donald, you may have updated your profile but you didn't update your profile 'signature' with your product suite, release, and platform.

We can help you better if we have that information.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Thanks Ginny,I made the updates.


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003