Well for a Monday morning I am drawing completely blank. I would think this would work, but maybe I am nuts. I have 2 controls, that are chained together. Store_Type and Level_Select. Both of those have parms assigned. I want to pass these parms into a 3rd control which as a fex behind it to get the Level_Val. Basically I want to have a single dynamic drop down based on the selections from the first 2 controls because the values of the 3rd control would be different based on the selections of the first 2. Is this possible? I am thinking so, but maybe I am confused this morning.
This message has been edited. Last edited by: MattC,
WebFOCUS 8.1.05
October 12, 2015, 05:01 PM
Waz
Have you chained the control to Level_Select ?
It should then pass the parms
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
October 13, 2015, 07:31 AM
MattC
I tried that, but I get a popup that tells me there appears to be an issue chaining Level_Select to Level_Val. Check procedures and Resolves paramter value.
I have a case open.
WebFOCUS 8.1.05
October 13, 2015, 10:47 AM
Barry Solomon
Hi Matt
You should be able to do this.
1 - chain Store_Type to Level_val and in the settings panel check the resolves parameter.
2 - chain Level_Select to Level_val and in the settings panel check the resolves parameter.
Just check the resolve parameter took and did not change to the last resolve parameter. In each settings window (right click the arrow head in the parameter window between the 2 controls).
If that does not work then set a third control with the values of store type and level select and then chain third control to the 4th.
Sorry Matt this is fairly complicated to describe in a few words. Send me a private email and we can discuss over the phone.
Thanks Barry
WebFOCUS 8 Windows, All Outputs
October 13, 2015, 02:56 PM
MattC
Thanks Barry. I got it working with using plain old Chaining. What threw me for a loop was, that 2nd SQL statement in my fex. I am querying a table for a specific value for the DROPDOWN_DISPLAY. I guess my mind went blank.
I am not sure how "chaining" works under the covers, but I will take it. Usually when I chain controls I have all the data points in one program or matching fields to chain off of and never have to query based off of passed values.
-* File: IBFS:/0-Dev/WFC/Repository/SVP_Portal/Reports/svp_common_hierarchy.fex Created by WebFOCUS AppStudio
-*******************************************************************************
-* SVP/DVP Portal
-*******************************************************************************
-* Module Name: svp_common_hierarchy.fex
-* Developer Name: Matt Chapin
-* Date Written: Oct 2015
-*******************************************************************************
-* Change Log
-*******************************************************************************
-SET &ECHO = 'ALL';
-INCLUDE IBFS:/WFC/Repository/SVP_Portal/Reports/svp_common_odscom.fex
-*
-DEFAULT &Str_Type = ''
-DEFAULT &Lev_Sel = ''
-SET &WhereStrType = IF '&Str_Type.EVAL' EQ 'COMPANY' THEN 'AND STORE_OP_TYP_CODE = ''CD'' ' ELSE
- IF '&Str_Type.EVAL' EQ 'FRANCHISE' THEN 'AND STORE_OP_TYP_CODE = ''FD'' ' ELSE '' ;
-SET &CHKTIME = HHMMSS('A8');
-TYPE ==================================================================================================
-TYPE &CHKTIME STEP 1: Get values from ODS_RPT_DROPDOWNS Hold as SELVAL
-TYPE ==================================================================================================
SQL
SELECT
DROPDOWN_NAM,
DROPDOWN_VALUE,
DROPDOWN_DISPLAY,
DROPDOWN_TEXT
FROM ODSADM.ODS_RPT_DROPDOWNS
WHERE DROPDOWN_LOC = 'SVP'
AND DROPDOWN_TEXT <> 'TOT'
AND DROPDOWN_VALUE = '&Lev_Sel.EVAL'
AND DROPDOWN_NAM = '&Str_Type.EVAL'
;
TABLE
ON TABLE HOLD AS SELVAL FORMAT ALPHA
END
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO HIER_END;
-*
-*-*-*?FF SELVAL
-*-SET &CHKTIME = HHMMSS('A8');
-*TABLE FILE SELVAL
-*HEADING
-*-*"&FEXNAME"
-*"&CHKTIME STEP 1: Dump of the SELVAL Hold File"
-*PRINT *
-*WHERE RECORDLIMIT EQ 100
-*END
-*-RUN
-*-EXIT
-READFILE SELVAL
-SET &DROPDOWN_VALUE = &DROPDOWN_VALUE;
-SET &DROPDOWN_TEXT = &DROPDOWN_TEXT;
-SET &DROPDOWN_NAM = &DROPDOWN_NAM;
END
-TYPE &DROPDOWN_VALUE
-SET &CHKTIME = HHMMSS('A8');
-TYPE ==================================================================================================
-TYPE &CHKTIME STEP 2. Get Disticnt values from DIM_STORE Hold as ODSHIERS
-TYPE ==================================================================================================
SQL
SELECT
DISTINCT CAST( &DROPDOWN_VALUE.EVAL AS CHAR(5) ) || ' - ' ||
CAST( &DROPDOWN_TEXT.EVAL AS CHAR(50) ) AS VALUE,
&DROPDOWN_VALUE.EVAL
FROM ODSADM.DIM_STORE
WHERE CURRENT_RECORD_FLAG = 'Y'
AND STORE_STATUS_CODE IN ('CT','OP')
AND STORE_OP_TYP_CODE IN ('CD','FD')
-*AND INCL_CP_FIN_HIER IN ('Y', 'N')
&WhereStrType.EVAL
ORDER BY &DROPDOWN_VALUE.EVAL
;
TABLE
ON TABLE HOLD AS ODSHIERS FORMAT XFOCUS
END
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO HIER_END;
-*
-*-*?FF ODSHIERS
-*-SET &CHKTIME = HHMMSS('A8');
-*TABLE FILE ODSHIERS
-*HEADING
-*-*"&FEXNAME"
-*"&CHKTIME STEP 1: Dump of the ODSHIERS Hold File"
-*PRINT *
-*WHERE RECORDLIMIT EQ 100
-*END
-*-RUN
-*-EXIT
-SET &CHKTIME = HHMMSS('A8');
-TYPE ==================================================================================================
-TYPE &CHKTIME STEP 3. XML Presentation
-TYPE ==================================================================================================
DEFINE FILE ODSHIERS
DROPDOWN_DISPLAY/A87 = VALUE ;
END
TABLE FILE ODSHIERS
PRINT
DROPDOWN_DISPLAY
BY &DROPDOWN_VALUE.EVAL
ON TABLE PCHOLD FORMAT XML
END
-RUN