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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
selection
 Login/Join
 
<user198>
posted
Hello,

i have a problem with a selection. I want to pass a parameter (team=...) in a hyperlink and in my fex should make this selection and write it into my graph selection. If I want to pass one parameter for the team, the team is not shown and it says: "Value for Team1 is missing". If I want to pass multiple parameters, the first team is always missing. This is why I wrote the clause -SET &Team= '&Team1.EVAL'; but it always says that the Value for the Team1 is missing.


DEFINE FILE wg_kd_betreuung
-SET &T= ' ';
-SET &Team= '&Team1.EVAL';
-SET &COUNTER=1;
-IF &Team0.EXISTS NE 1000 THEN GOTO LOOP1 ELSE GOTO DONE;
-LOOP1
-SET &T = 'AND ((TEAM EQ ''&Team.EVAL'')';
-IF &Team0.EXISTS NE 1 THEN GOTO OUTLOOP;
-REPEAT OUTLOOP FOR &COUNTER FROM 2 TO &Team0;
-SET &TEAMNEU= &Team.&COUNTER;
-SET &T = &T | ' OR (TEAM EQ ''&TEAMNEU.EVAL'')';
-OUTLOOP
-SET &T = &T | ')';
-DONE
END

What can I do that the first team is also shown? Please help me.

Katy
 
Report This Post
Expert
posted Hide Post
Katy,

When you pass only one parameter from your selection HTML WebFOCUS only passes the Variable (in this case) &Team.

When you pass mulitple values then WebFOCUS will pass -

&Team - The first value selected
&Team0 - The number of values being passed
&Team1 - The first value selected (same as &Team!)
&Team2 - The second value selected
etc.

The way I would code for this (not necessarily the best method Smiler ) using your supplied code is -

-SET &T = 'AND ((TEAM EQ ''&Team.EVAL'')';
-IF &Team0.EXISTS NE 1 THEN GOTO OUTLOOP;
-REPEAT OUTLOOP FOR &COUNTER FROM 2 TO &Team0;
-SET &TEAMNEU= &Team.&COUNTER;
-SET &T = &T | ' OR (TEAM EQ ''&TEAMNEU.EVAL'')';
-OUTLOOP
-SET &T = &T | ')';
-DONE

Although as I mentioned in my PM I would prefer to use the CONTAINS verb rather than multiple ORs -

-SET &T = '(''&Team.EVAL''';
-IF &Team0.EXISTS NE 1 THEN GOTO OUTLOOP1;
-REPEAT OUTLOOP1 FOR &COUNTER FROM 2 TO &Team0;
-SET &TEAMNEU= &Team.&COUNTER;
-SET &T = &T | ',''&TEAMNEU.EVAL''';
-OUTLOOP1
-SET &T = &T | ')';
-DONE

And then in your Fex you would add the WHERE clause -

WHERE &T.EVAL CONTAINS TEAM

Even if there is only one value selected, the WHERE clause will still function correctly.

I have tested both of these using default values of -

-DEFAULT &Team = 'Team 1';
-DEFAULT &Team0 = 5;
-DEFAULT &Team1 = 'Team 1';
-DEFAULT &Team2 = 'Team 2';
-DEFAULT &Team3 = 'Team 3';
-DEFAULT &Team4 = 'Team 4';
-DEFAULT &Team5 = 'Team 5';

and the first method produces -

AND ((TEAM EQ 'Team 1') OR (TEAM EQ 'Team 2') OR (TEAM EQ 'Team 3')
OR (TEAM EQ 'Team 4') OR (TEAM EQ 'Team 5'))

whereas the second method produces -

WHERE ('Team 1','Team 2','Team 3','Team 4','Team 5') CONTAINS TEAM

If you remove the default for &Team0 (to simulate one selection) then you get -

AND ((TEAM EQ 'Team 1'))

or

WHERE ('Team 1') CONTAINS TEAM

respectively, both of which are valid syntax.

Good luck

Tony
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
With release 5.2.5 on unix, there was a bug. IBI CSS cases 91341130 and 91751019 document this.

This was my question to IBI CSS:

I have entered the code on pages 8-20 through 8-24 of WebFOCUS Developing Reporting Applications. I substituted CAR for SHORT, and SEATS for PROJECTED_RETURN in mulrpt.fex.

The "application" runs correctly if you make multiple selections, but fails if you make a single selection.

Is the code in the example correct?


The workaround suggested to us was this:

When only 1 selection is made from the list, &COUNTRY0 is not passed in the URL string. Therefore, the IF &COUNTRY0.EXISTS will blow up.

To get around it, use -DEFAULTS &COUNTRY0=99; If it is passed in the URL, then its value will be re-set, otherwise, it will remain at 99. So you can test for 99 and branch based on that.


HTH, Suzy
 
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003Report This Post
Virtuoso
posted Hide Post
I agree, when we went to the 5.x version of WebFOCUS, the Java interpreter no longer seems to recognize 'amper' variables embedded as part of a field name. For example, I had 8020&D in code that ran fine and dandy now when run no prompt, but the error shows up as no value supplied for &D. I had reported something regarding to IB but no fix ever came. I haven't tried in the 7. world yet.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
I have always recommended to my Clients that they -DEFAULT those variables that are not specifically -SET, even in drill down reports, to avoid situations like these.

As we have all encountered over the years (some for many years Frowner ) there is always an element of code tightening (whether intended or otherwise) and we will get caught out on an upgrade.

How many still use -SET &ECHO=ALL; without the single quotes around ALL? You can guarantee that this loop hole will be 'fixed' at some stage.
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Tony Alsford:
[qb] . . .
How many still use -SET &ECHO=ALL; without the single quotes around ALL? You can guarantee that this loop hole will be 'fixed' at some stage. [/qb]
No hole there.

In -SET: -SET FOO=BAR;
or TABLE: IF FOO NE BAR

BAR in the RHS cannot be mistaken for a variable, so the quotes are optional.

As opposed to (DEFINE or COMPUTE)
MyDate/MDY = &MDY; (or 091305Wink

where the RHS could represent either an offset, or a date literal. -- That's ambiguous, and Focus seems to try both, giving preference to the date if it's valid. I play safe and quote the date.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders