Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] Chaining comboboxes with where clauses.
Go
New
Search
Notify
Tools
Reply
  
[solved] Chaining comboboxes with where clauses.
 Login/Join
 
Silver Member
posted
I have 2 comboboxes that are chained. The first combobox contains a year and the type of report that is to be run - i.e., Monthly, Qtr, YTD etc. For this case, the report is only run monthly. The second prompt is the 3-character month. I do not want to show all 12 months for 2014 since 2014 is not over yet so I have included an additional where clause on the dynamic embedded procedure. The chaining works ok if I only put the where clause on the first prompt and not on the second. However, if I don't included it on the second prompt, it displays all 12 months. If I put the same where clause on the second prompt it breaks the chain.

Here is the first prompt
TABLE FILE PERIOD_DATE
SUM FRST.PERIOD_DATE.YEAR_RANK
BY PERIOD_DATE.YEAR_DESCR
WHERE MIN_DATE GE '20120101';
WHERE MIN_DATE LE CURR_DATE;
WHERE DATE_TYPE EQ 'M';
ON TABLE PCHOLD FORMAT XML
END

The second prompt follows
TABLE FILE PERIOD_DATE
SUM FRST.PERIOD_DATE.MONTH
BY PEROD_DATE.MONTH_RANK
ON TABLE PCHOLD FORMAT XML
END

When I add the same 3 where clauses it breaks the chain. Is there any way to restrict the second drop down and still have use chaining?

Thank you.

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


8.0.0.8
Linux/windows
 
Posts: 36 | Registered: October 24, 2012Reply With QuoteReport This Post
Master
posted Hide Post
You can use JavaScript function and add onselect or onclick event on first prompt. So the JS will do limiting the values for current year selection.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
-*(1)
SET ASNAMES = ON
 TABLE FILE CAR
PRINT COUNTRY BY COUNTRY AS MYCOUNTRY
ON TABLE PCHOLD FORMAT XML
END


-*(2)
-DEFAULT &MYCOUNTRY = 'ALL';
-SET &filterMYC = IF &MYCOUNTRY.QUOTEDSTRING EQ 'ALL' THEN ' ' ELSE 'IF COUNTRY EQ '''| &MYCOUNTRY | '''' ; 
SET ASNAMES = ON
TABLE FILE CAR
PRINT CAR BY CAR AS CAR
&filterMYC  
ON TABLE PCHOLD FORMAT XML
END
 

you're in 77 and i'm only in 768, so we have to tweak the chained .htm page to make the chaining actually work. Maybe in 77 its fixed; i'll see in a month. But do you see the point i'm making? you have to use the parameter generated by the first fex inside of the 2nd fex




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Silver Member
posted Hide Post
Thanks for the replies. Susannah, I'm not quite sure what you are doing. Does this mean that instead of linking the two dropdown lists within the parameters tab on the gui you are tweaking the code by grabbing the MYCOUNTRY variable from the first combobox and using it in the second?

Thanks.


8.0.0.8
Linux/windows
 
Posts: 36 | Registered: October 24, 2012Reply With QuoteReport This Post
Expert
posted Hide Post
Kris, i only use the gui to set up the look of the page, and then click on each combo box, in turn, with the yellow chain icon clicked.
We gave a prez at Summit one year, called 'The Chain Gang', w/ Tony A. see if you can find it in ibi's archives.
but essentially, yes. the fexes that underly each of the dropdowns in the chain are separate fexes, and you control each one based on whatever parms have been selected by the previous ones in the chain.
eg..if you have a third dropdown, then its fex would have 2 parameters defaulted, and two filters active.

this method of independent fexes is Complex Chainging. there's another way called Compound Chaining that uses only 1 fex, produces a giant array that loads into the browser. the benefit is that making choices is faster b/c the stuff is already in your browser. the downside is it only works for small datasets... a large array takes forever to download or never does.

you're in 77 and i'm only in 768 , so i still have to tweak the .htm manually to get the chaining to actually work. Let me know how you're getting on, and if you still have to tweak, i'll help you learn how to do that.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Silver Member
posted Hide Post
Thanks for the clarification Susannah. I will keep this in mind for future reference. Having said that, I figured out how to get the chaining to work. In essence I needed to add a second BY clause in the dynamic embedded procedure.


8.0.0.8
Linux/windows
 
Posts: 36 | Registered: October 24, 2012Reply With QuoteReport This Post
Expert
posted Hide Post
ah. so you used the COMPOUND method. ... 1 fex, multiple parms




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi Kris

You can also replace the by with a WHERE COUNTRY EQ &CNTY - and in the Properties and settings windows set the resolve parameter to CNTY.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 82 | Location: NYC | Registered: November 13, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] Chaining comboboxes with where clauses.

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.