Focal Point
[CLOSED]Pass 2 Values for 1 selection HTML form

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

August 09, 2016, 03:44 PM
RosieGilbert
[CLOSED]Pass 2 Values for 1 selection HTML form
I have a report that is setup with a multiselect OR parameter. My challenge is, I would like the user to select 1 value, and that represent multiple values to pass to the report. So in this scenario I would like the user to select ABANDO and it pass ABAJO.MH and ABAJO.ZZ to the report. I am familiar and have had success configuring list boxes and parameters to have a display value and a return value but I cant figure out a way to pass two values in a way the report will accept it.

I have tried several scenarios with the following results.

DISPLAY VALUE RETURN VALUE TEST RESULT

ABANDO ABAJO.MH Works, Returns values for ABAJO.MH
ABANDO ABAJO.ZZ Works, Returns values for ABAJO.ZA
ABANDO 'ABAJO.MH' Error:MISSING QUOTE MARKS: ''ABAJO.MH''
ABANDO ABAJO.MH OR ABAJO.ZZ Doesnt return any records
ABANDO 'ABAJO.MH' OR 'ABAJO.ZZ' SYNTAX ERROR: WHERE PBR_COMBINED_VW.RVU_COMBINED_VW.PROVIDERID EQ &ProviderName.(OR()).ProviderName.;

I have several scenarios at my organization in which multiple values are collectively known as one thing - so a technique to accomplish this would be very, very helpful!

Thank you!

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.2, Server 2008 R2, SQL 2014 data warehouse
August 10, 2016, 08:12 AM
MartinY
Why not have your first selection where ABANDO is selected by the user and returned as parameter to another TABLE FILE that will select all ABAJO.MH, ABOJO.ZZ according to first selection which will become the parameter for your report ?

Something such as
-* THIS IS JUST TO HAVE A SELECTION MADE BY A 'USER'
TABLE FILE CAR
BY COUNTRY AS 'SELPARM'
WHERE COUNTRY EQ '&CNTRY.(FIND COUNTRY,COUNTRY IN car).Country.';
ON TABLE HOLD AS CNTRY FORMAT BINARY
END
-RUN
-READFILE CNTRY
-RUN

-* TO RETREIVE MULTIPLE VALUES BASED ON USER'S SELECTION
TABLE FILE CAR
BY CAR
WHERE COUNTRY EQ '&SELPARM';
ON TABLE HOLD AS SELCAR FORMAT ALPHA
END
-RUN

-* PRODUCE REPORT BASED ON MULTI SELECTION
TABLE FILE CAR
PRINT RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
WHERE CAR IN FILE 'SELCAR';
END
-RUN



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 22, 2016, 11:22 AM
RosieGilbert
Any pointers on how to do this through the GUI? I am going to attempt to do this through FOCUS code but we are trying to stick to GUI for supportability moving forward.


WebFOCUS 8.2, Server 2008 R2, SQL 2014 data warehouse
September 06, 2016, 02:52 PM
MartinY
Using the GUI ?
Can't figure out how to perform such thing...GUI as limitation...

Otherwise you will need more than one control and chain them together where first will select ABANDO then the second one will be filtered to display only values matching from ABANDO. This is how parent-child relationship works using GUI


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
September 13, 2016, 09:32 AM
Lary Dooley
If you really have this
I would like the user to select ABANDO and it pass ABAJO.MH and ABAJO.ZZ to the report.

then it could just be contains vs eq in the where clause

You could set up something like this

defaulth whereeq = 'EQ';
and pass in whereeq = 'CONTAINS' in a hidden text box in the gui.


8.0.1