Focal Point
[CLOSED] Drilldowns based on dynamic sort

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

August 01, 2012, 09:24 AM
ReddyP
[CLOSED] Drilldowns based on dynamic sort
I have 4 dropdowns on the html page and user could select one or all of them. These values (fields) would be used in the fex to display in the selected sort order.
For example:
if I have four dropdowns for fields
car, model, country, dealer cost.
When a user selects first dropdown value as car and selects nothing in the rest of the dropdowns, report would be sorted and aggregate the numbers based on car field.
But, in the drilldown to see the detail behind the aggregated number, user would like to see drilldowns (as drillmenu items) on the rest of the fields that were not selected from the html page dropdown.
I can hardcode saying if &by1 is car, then have drillmenu items for country, model and dealer cost. if &by1 is model, then have drill menu items for car,country and dealer cost.
But, I think this is tedious and I would like to know if there is a easy way to do this instead of harding coding all the values like this.
Besides, user could be selecting one or multiple sorts.
Any ideas please?

Thank you.

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


7.7.01,windows2008 R2
August 01, 2012, 10:03 AM
rfbowley
Yes, the coding is a bit tedious, but I used DRILLMENUITEM coupled with a WHEN condition to accomplish this sort of thing. Here is an example:

 
-**********************************************************************************
-*	Drill menu items available to Received Records
-**********************************************************************************
TYPE=DATA,
     COLUMN=ACTION,
	WHEN=SURV_RESP_RVW_STAT_CD EQ 'R',
     DRILLMENUITEM='Approved',
        FOCEXEC=app/surmod03( \
		RESPONDER =RESP_ID \
	    PROVIDER=PROV_ID \
		LST_CHG=RESPDR5 \
	    ACTION='Approved' \
	    ),
		TARGET=&Target.EVAL,
     DRILLMENUITEM='Pending',
        FOCEXEC=app/surmod03( \
		RESPONDER=RESP_ID \
     	PROVIDER=PROV_ID \
		LST_CHG=RESPDR5 \
     	ACTION='Pending' \
     	),
		TARGET=&Target.EVAL,
     DRILLMENUITEM='Declined',
        FOCEXEC=app/surmod03( \
	 	RESPONDER =RESP_ID \
     	PROVIDER=PROV_ID \
		LST_CHG=RESPDR5 \
    	ACTION='Declined' \
     	),
	 	TARGET=&Target.EVAL,
	DRILLMENUITEM='Flag For QI',
		FOCEXEC=app/surmod04( \
		Resp_TS = RESP_TS \
		Resp_ID = RESP_ID \
		Surv_ID = SURV_ID \
		Qstn_ID = QSTN_ID \
		Answ_ID = ANSW_ID \
		), TARGET='_blank',
$
 



Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
August 02, 2012, 03:23 PM
susannah
aha. i do this all day long....
i have a parm called BYFIELD
and i set it to whatever the user selects as the first BY.
then i create comment markers in my fex.
-SET &cmt_car=IF &BYFIELD IS 'CAR' THEN '-*' ELSE '';
-SET &cmt_model=IF &BYFIELD IS 'MODEL' THEN '-*'
ELSE '';
-SET .. you get it.

then in my drilldown
&cmt_car.EVAL DRILLMENUITEM='sort by car',focexec=&dd0(BYFIELD = 'CAR' , ....),
&cmt_model.EVAL DRILLMENUITEM='sort by model',focexec=&dd0(BYFIELD = 'MODEL' , ....),
&cmt_country.EVAL ... you get it.

user only sees what they haven't sorted by.
you can expand on this idea of using &cmt_ variables to comment out lines you don't need in a ton of ways.




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