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     multiple selection in a drill-down list

Read-Only Read-Only Topic
Go
Search
Notify
Tools
multiple selection in a drill-down list
 Login/Join
 
<user198>
posted
Hello,

i have a problem with the handing over of variables. My code is the following:

DEFINE FILE wg_kd_betreuung
OPTOrt/A40 = '<option>'|ORT|'</option>';
END
TABLE FILE wg_kd_betreuung
SUM OPTOrt
BY ORT NOPRINT
ON TABLE HOLD FORMAT ALPHA AS DYNAMLST
END

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

On my page you can see the drill-down list with all teams out of the table "kd_betreuung" but if you want to select more than one team, you can see in the URL that the Teams are included but in the graphic they are not shown, espacially there is no graphic shown because the teams are not committed.

In the source code it is said:

TABLE FILE wg_kd_betreuung
-SET &COUNTER=1;
-SET &T=' ';
-IF 1 THEN GOTO LOOP1 ELSE GOTO DONE;
-LOOP1
-SET &T = 'AND (TEAM EQ ''HAM WG3/M'')';
-IF 1 NE 1 THEN GOTO OUTLOOP;
-REPEAT OUTLOOP FOR COUNTER FROM 2 TO 2;
-SET &T = AND (TEAM EQ '&Team') | 'AND (TEAM EQ ''HAM WG3/P'')';
-REPEAT OUTLOOP FOR COUNTER FROM 2 TO 2;
-OUTLOOP
-DONE
END

and in the definition of the graphic stands:

GRAPH FILE WG_VIEW_KD_PERFORMANCE
SUM WG_VIEW_KD_PERFORMANCE.UC09AUNS AS 'COUNT'
ACROSS myDATUM AS 'DATE'
BY TEAM AS 'TEAM'
WHERE (myDATUM GE TStart) AND (myDATUM LE TStart )
AND (TEAM EQ '&Team')AND (TEAM EQ '&Team2');

I do not know why in the last phrase stands " AND (TEAM EQ '&Team')AND (TEAM EQ '&Team2');" because there should be the names of the teams, or not? Perhaps I have made a mistake in the whole part.

I hope you can help me out and thanks a lot!
Smiler
Katy
 
Report This Post
Expert
posted Hide Post
Katy,

You show the actual code from your report but not from the GRAPH FILE. I guess that the DM for the building of the WHERE clause is achieved outside of your TABLE request? That being the case I also guess that you have the code -

WHERE (myDATUM GE TStart) AND (myDATUM LE TStart )
&T;

in your GRAPH FILE request?

If this is the case then I would hazard a guess that the &T in your GRAPH FILE is not being fully evaluated so changing it to &T.EVAL may be the solution.

If that doesn't work then post your code in full (if you can, or PM it) and we'll try to assist further.
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
make sure there's a space before the AND in your &T; in your example, there isn't; maybe that's just a repro-typo.
oh yes...good catch, Francis.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
AND (TEAM EQ '&Team')AND (TEAM EQ '&Team2');

TEAM cannot be equal to both values.

AND (TEAM EQ '&Team') OR (TEAM EQ '&Team2');
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Katy,

In additon to the PM I sent you, I thought that I would give you an example of the suggestion -

-SET &Team = 'ENGLAND';
-SET &Team0 = 3;
-SET &Team1 = 'ENGLAND';
-SET &Team2 = 'FRANCE';
-SET &Team3 = 'JAPAN';

-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

TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY CAR
BY MODEL
WHERE RCOST GE 3200 AND RCOST LE 8000
WHERE COUNTRY IN &T
END

The WHERE COUNTRY could be replaced with AND COUNTRY but they both would imply the same condition.

You should get only three records out as one car from Japan is less than 3200 and all but one car from England are greater than 8000.

As I said, I sometimes prefer using CONTAINS (or IN) rather than multiple ORs.

Good luck

Tony
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<user198>
posted
Hello everyone,

thanks for your help! All works...

Katy

This is my code:

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

...

WHERE ((myDATUM GE &S) AND (myDATUM LE &E))
&T.EVAL;
 
Report 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     multiple selection in a drill-down list

Copyright © 1996-2020 Information Builders