I have a requirement to display the current_month in the Month Prompt. How do I achieve this in dashboard?
Thanks, SmanickaThis message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 8.0.07 Windows, HTML
June 17, 2014, 06:50 AM
diogopc
Hi Smanicka,
In the HTML Composer, if you check View -> Properties and Settings and then click on your Month Prompt you get a bunch of settings regarding the prompt, see if that solves your problem.
WebFOCUS App Studio 8103 Windows7 All outputs
June 17, 2014, 08:59 AM
Ram Prasad E
You can create an onload event and control current month selection using javascript.
Could you please send me the sample javascript code for displaying the current-month in the prompt.
The Month Prompt is actually designed as follows
TABLE FILE F_WTC_CUSTOMER_PROFITABILITY_REPORT SUM FST.F_WTC_CUSTOMER_PROFITABILITY_REPORT.V_D_MONTH.FY_MONTH_DESC // Display Field BY F_WTC_CUSTOMER_PROFITABILITY_REPORT.V_D_MONTH.FY_MONTH_KEY // Value Field // TODO: Add your filters here to replace defaults ON TABLE PCHOLD FORMAT XML END
Thanks, Saranya MThis message has been edited. Last edited by: Smanicka,
WebFOCUS 8.0.07 Windows, HTML
June 19, 2014, 02:36 AM
Dave
Don't use javascript.
You're on the right track.
You've already got a .fex that outputs XML.
In the HTML composer. Goto to the Parameter screen ( tab ).
Right click the control and go to properties. Set it to "Dynamic" and choose to use a external procedure. The select the .fex with the above mentioned code and you're done.
I know, people are going to complain about me saying "Don't use javascript". But I think it's a far better choice to use a fex. You have much more control and the ability to use data from your RDMS.
G'luck.
_____________________ WF: 8.0.0.9 > going 8.2.0.5
June 19, 2014, 06:39 AM
Ram Prasad E
Hi,
You need to place HIGHEST keyword in TABLE FILE request to get the current month.
TABLE FILE F_WTC_CUSTOMER_PROFITABILITY_REPORT
SUM FST.F_WTC_CUSTOMER_PROFITABILITY_REPORT.V_D_MONTH.FY_MONTH_DESC // Display Field
BY HIGHEST F_WTC_CUSTOMER_PROFITABILITY_REPORT.V_D_MONTH.FY_MONTH_KEY // Value Field
// TODO: Add your filters here to replace defaults
ON TABLE PCHOLD FORMAT XML
END
I tried the solution which you have provided.It displays the highest month_key i.e "December" instead of current month.
Thanks, Saranya
WebFOCUS 8.0.07 Windows, HTML
June 20, 2014, 03:03 AM
Ram Prasad E
Hi,
You need to restrict with a WHERE clause like below.
WHERE FY_MONTH_KEY LE &YYYYMM; END
If your requirement is to have current month selected in the list box along with having future months, then you need try with something like below. You can also use JS to control it.
[CODE]
TABLE FILE F_WTC_CUSTOMER_PROFITABILITY_REPORT SUM FST.F_WTC_CUSTOMER_PROFITABILITY_REPORT.V_D_MONTH.FY_MONTH_DESC // Display Field NOPRINT COMPUTE LIST_SELECT/A200=IF FY_MONTH_KEY EQ &YYYYMM THEN '' ELSE ''; BY HIGHEST F_WTC_CUSTOMER_PROFITABILITY_REPORT.V_D_MONTH.FY_MONTH_KEY // Value Field NORPINT ON TABLE HOLD AS H_LIST_BX_1 FORMAT HTMTABLE ON TABLE SET HOLDLIST PRINTONLY END -RUN
-HTMLFORM BEGIN < HTML> < BODY> < SELECT NAME=LIST_BX_1 ID=LIST_BX_1> !IBI.FIL.H_LIST_BX_1; < /SELECT> < /BODY> < /HTML> -HTMLFORM END