I have multiple charts on a html page, and a single fex I do an -INCLUDE on each chart to set my parameters for the chart in focus at runtime.
When I add the first chart to my page (GUI), I'm prompted to create controls for my chart. Then, when I go to add my next chart, I want a separate set of controls that will only change the chart above it. But, because my parameters are the same name (single fex with parameters), I don't get prompted to add these new controls.
One way I've thought of doing this is naming my parameters dynamically like below, but I can't get it to work:
-SET &ECHO=ALL; -DEFAULT &CHT='_CHT_A'
-SET &SORTORD|&CHT='INVERT';
I want the line above to read:
-SET &SORTORD_CHT_A='INVERT';
Can anyone assist in what I need to do? I feel it's obvious, but I'm still missing it...Thanks!This message has been edited. Last edited by: FP Mod Chuck,
WF 8.0.08 (Prod); WF 8.2.06 (Dev)
August 18, 2017, 10:21 AM
MartinY
A dynamic parameter as you stated (-SET &SORTORD|&CHT) can only exist at run time. So it is "normal" that the GUI is not aware if its existence.
I'm wondering one thing : why would you like to include several charts on a same HTML page of they all have different update parameters ? It's going to be a nightmare to associate the proper parameter with the proper chart : and I'm not talking of programming side but user side. They will have to figure that if they change param-1 it will update chat-1, param-2 for charts-2 and param-3 for chart-1 and chart-2 ? It may be your need, but I found it confusing.
As far as I can know without doing a lot of research, you will need to have distinct parameter per chart.
Or a thing that you can do is to keep the unique parameter's name in the charts but have your main fex with the distinct one.
-* Main fex to call chart A and receive parameters from HTML
-* -------------------------------------
-SET &ECHO=ALL;
-DEFAULTH &SORTORD = ''
-DEFAULT &SORTORD_CHT_A = 'INVERT'
-SET &SORTORD = &SORTORD_CHT_A;
-INCLUDE app/CHART_A.fex
-* Main fex to call chart B and receive parameters from HTML
-* -------------------------------------
-SET &ECHO=ALL;
-DEFAULTH &SORTORD = ''
-DEFAULT &SORTORD_CHT_B = 'REGULAR'
-SET &SORTORD = &SORTORD_CHT_B;
-INCLUDE app/CHART_B.fex
Having the main 2 fex in your HTML should then popup for distinct parameters but your charts keep unique one. Do not reference the charts in your HTML, but the above fex.
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
Instead of dynamic naming, for simplicity and clarity I would prefer to create a driver fex for each of the respective charts on the page, with distinct parameters.
Chart A would call driver A, whose parameters are those of the common charting fex but with A appended to the parameter names; to generate the chart it sets the common fex's parameters to the corresponding ones it receives...