Focal Point
Parm *SELECT ALL on a Dynamic List Selection

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

December 01, 2008, 01:51 PM
Wayne Brown
Parm *SELECT ALL on a Dynamic List Selection
Question, I'm putting parms on a report I've developed. It's a multi-select compare value from a dynamic list. When I run it this way, it requires me to select values from each list. In this case, I have managers and status. I'd like to be able to select all (for instance on status) without having to highlight each value.

When I run the parm as a Static List, it gives me the *Select All value. Can I use that in a dynamic list selection? If so, how?

Here's the parm select

WHERE ( TWDRVMGR EQ &TWDRVMGR.(OR(FIND TWDRVMGR IN twicpf)).Driver Manager. ) AND ( TSSTSDESC EQ &TSSTSDESC.(OR(FIND TSSTSDESC IN twicstspf)).TSSTSDESC. );

Thanks


7.6.4, iSeries, Windows, DB2
December 01, 2008, 10:29 PM
susannah
wayne
i'm guessing you haven't written an actual launch page, using DevStu, is that right?

did you use a gui to generate that WHERE statement? How do you make the file 'twicpf'?

what you're going to want is an entry in your selectable list , at the top, for ALL and the value that gets passed is FOC_NONE.
If you use devstu to build a launch page,
and you choose to let a dropdown parm be populated "dynamic" or from the master, you have the opportunity to check the box for 'the ALL option', and you'll get an entry in your dropdown with the word "ALL", and the value FOC_NONE.
When focus sees
"WHERE TWDRVMGR EQ FOC_NONE" , it knows to ignore the filter.

See how far you can get with all this so far...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 02, 2008, 01:10 AM
<JG>
susannah, I thought tht you did not like FOC_NONE, anyway only works if you're MRE.
December 02, 2008, 08:46 AM
j.gross
quote:
WHERE ( TWDRVMGR EQ &TWDRVMGR.(OR(FIND TWDRVMGR IN twicpf)).Driver Manager. ) AND ( TSSTSDESC EQ &TSSTSDESC.(OR(FIND TSSTSDESC IN twicstspf)).TSSTSDESC. );


When FOC_NONE appears in the TABLE request (after resultion of the "FIND" references) it causes the entire line of code in which it appears to be ignored. So, in following Susannah's lead, you need to separate the two conditions into independent Where clauses, appearing on separate lines, like so:
WHERE TWDRVMGR EQ &TWDRVMGR.(OR(FIND TWDRVMGR IN twicpf)).Driver Manager. ;
WHERE TSSTSDESC EQ &TSSTSDESC.(OR(FIND TSSTSDESC IN twicstspf)).TSSTSDESC. ;



- Jack Gross
WF through 8.1.05
December 02, 2008, 09:07 AM
j.gross
quote:
FOC_NONE ... only works if you're MRE


Untrue.


- Jack Gross
WF through 8.1.05
December 02, 2008, 11:52 AM
Wayne Brown
susannah, I have created launch pages and tried that on this one. But what I've found, is if I have two parms, the Select All function does it for both selections. I can't pick a manager and all statuses for example.

The TWICPF is not a hold file, it's a DB2 table.

Going to try J. Gross's code now. Maybe that will rectify that problem.

I am using MRE.

Thanks.


7.6.4, iSeries, Windows, DB2
December 02, 2008, 12:04 PM
Darin Lee
Jack's comment identifies the issue you are having and his solution should fix your problem. That's one of the quirks that MANY people encounter when using FOC_NONE. You cannot use compound selection criteria.

Personally, I try to stay away from using it, but sometimes it's a quick solution. Otherwise, I code my own "ALL" value and use Dialogue Manager to create the appropriate filters.


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
December 02, 2008, 12:19 PM
Wayne Brown
Brilliant! That did work. Thanks very much for the simple solution.

Darin, Tom F also recommended doing it the way you suggested but at this point, I'm fuzzy on coding the ALL value. But do want to try that.

Thanks again Jack.


7.6.4, iSeries, Windows, DB2
December 02, 2008, 01:50 PM
RSquared
Another way of doing this is to add DM -IF &TSSTSDESC = 'FOC_NONE' THEN GOTO -BYPASS, and don't test for a value when you want all values.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
December 02, 2008, 08:56 PM
susannah
true, i myself don't like FOC_NONE b/c it isn't actually a character string and i'm usually doing alot more with my &parms in a fex than just constructing a where statement. I've gotten in trouble w/ it...so i have other things i prefer to use , that are bulletproof.
and i just read Darin's post and i agree w/ him.
But FOC_NONE does work outside of mre, and it is way wicked cool...for what it is.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID