Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Dynamic Parameter Name

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Dynamic Parameter Name
 Login/Join
 
Gold member
posted
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)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
That makes sense. I'll give that a shot. Thanks!


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
Master
posted Hide Post
You can use a . ( period ) for that.

-SET &A = 1;
-SET &PARAM.&A = 'this is a';

-SET &A = 2;
-SET &PARAM.&A = 'this is b';


-SET &A = 1;
-TYPE &PARAM.&A
-SET &A = 2;
-TYPE &PARAM.&A


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Gold member
posted Hide Post
Perfect! Thanks!


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
Virtuoso
posted Hide Post
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...
    -DEFAULT &SORTORDA='...';
    -SET &SORTORD=&SORTORDA;
    and so on for the other paranmeters;
    and then -INCLUDEs the common charting fex.

  • Similarly for charts B, C, ....


In the common charting fex, adjust the -DEFAULT/-DEFAULTH directives so they won't trigger creation of controls for its parameters.

And let nature take its course.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
I've actually done something along these lines...thanks.


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Dynamic Parameter Name

Copyright © 1996-2020 Information Builders