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.
JayThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8.1/8.2, Windows 10/Server 2012
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
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.]
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,
|Powered by Social Strata|