Focal Point
I expected mutiselect prompts to work different

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

September 26, 2007, 01:17 PM
jammer
I expected mutiselect prompts to work different
I thought with the the code below if I selected only a car without a country I would get all countries with that car for example

Country Car
No Selection Jensen

Report World be
Country Car
England Jenen

Instead I get all countries - all models

Am I oversimplifying things. How do I do with autoprompting two multiselects where if I just enter stuff into second box it works correctly.

*************************************
TABLE FILE CAR
BY COUNTRY
BY CAR
HEADING
""
FOOTING
""
WHERE ( COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR)).COUNTRY. ) AND ( CAR EQ &CAR.(OR(FIND CAR IN CAR)).CAR. );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

***********


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
September 26, 2007, 01:45 PM
Fernando
Jammer,

This sounds like FOC_NOE is getting you. I'm betting that when you don't select a country FOC_NONE is passed or is the default. if this is the case then the entire line:

WHERE ( COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR)).COUNTRY. ) AND ( CAR EQ &CAR.(OR(FIND CAR IN CAR)).CAR. );


is skipped.

Try splitting it into 2 lines:

WHERE ( COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR)).COUNTRY. );
WHERE ( CAR EQ &CAR.(OR(FIND CAR IN CAR)).CAR. );


The AND is implied due to the 2 where statements.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
September 26, 2007, 02:24 PM
jammer
Interesting.. you are correct



I would have thought my statements and your's broken up where equivalent. (actually it is a little worrisome since, I never expected them to behave different.)

I notice in dev stdio when you split the where clause you can select either one in the "Where Assist" but you can't create a new "where" within the assist.

Or restated - I can say I could not create the two where clauses in the graphic tool. (Another thing not possible in the graphic tool!)


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
September 26, 2007, 02:34 PM
dhagen
Yes you can. Do the country where with the assist, then click ok when done. You can then select new in the where dialog box, and open a new assist window for car.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
September 26, 2007, 02:39 PM
jammer
I stand corrected - thanks again


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
September 26, 2007, 05:31 PM
Darin Lee
The problem you are seeing is a little glitch with the way they have implemented the FOC_NONE functionality. When the request is parsed, if it finds the value FOC_NONE anywhere in the selection, the whole selection is ignored (commented out, basically). So if you have a compound where, it ignores everything, regardles of the AND or OR. The solution, as mentioned, is to break it into two separate WHERE statements, which use an implicit AND.


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