Focal Point
[CLOSED] Multi-Select Filter Only Recognizes Last Selection

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

July 08, 2019, 11:55 AM
Jay Ervin
[CLOSED] Multi-Select Filter Only Recognizes Last Selection
Hello!

I'm trying to code for a multi-select variable. The following code works for a single selection, but if multiple options are checked, only returns the last option selected:
  TABLE FILE CAR
	SUM SALES
	BY CAR
	WHERE (COUNTRY EQ &strCountry.(OR(FIND COUNTRY,COUNTRY IN CAR)).Country. );
END


I've dabbled with single quotes around the variable/find, to no avail.

Any suggestions on making a multiple option variable function correctly?

WF 8.1 for this project.

Thanks!
Jay

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.1/8.2, Windows 10/Server 2012
July 08, 2019, 11:59 AM
BabakNYC
You need an OR like this:
 
	WHERE COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR |FORMAT=A10,SORT=ASCENDING,REQUIRED=TRUE)).COUNTRY:.;



WebFOCUS 8206, Unix, Windows
July 08, 2019, 03:11 PM
Hallway
Syntax: How to Add a Dynamic Multiselect List of Values:
 &variable.(operation (FIND return_fieldname [,display_fieldname] IN datasource[|SORT=sortoption] [|FORMAT=format] [,WITHIN=within])).[description.] 

Docs: https://infocenter.information...4b-9910-20CFB80AA381

Once there, click on "Adding a Multiselect List of Values" then "Add a Dynamic Multiselect List of Values"

This message has been edited. Last edited by: Hallway,


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs: