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]Multiselect Independent

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Multiselect Independent
 Login/Join
 
Silver Member
posted
Hi,

I want to create an extract where the user can select multiple values and it will populate the records that have ANY of those values.

There are three variables - location, program, and department. I created a multiselect that let's the user select say, A location, AB program, and nothing for C and it would show that exact combination.

What I am looking for is if the user selects A Location, and B location, I will still show records that ONLY contain A location even if it does not contain A or B program, and it will also show records that belong in A program or B Program, even if it does not contain A location.


My code right now is:

AND ( FACT_RISKPRO.FACT_RISKPRO.LOCATION EQ &LOCATION.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.LOCATION IN FACT_RISKPRO)).LOCATION:. )
AND ( FACT_RISKPRO.FACT_RISKPRO.PROGRAM EQ &PROGRAM.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.PROGRAM IN FACT_RISKPRO)).PROGRAM:. )
AND ( FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT EQ &DEPARTMENT.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT IN FACT_RISKPRO)).DEPARTMNENT:. );

This message has been edited. Last edited by: hfung1,


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Master
posted Hide Post
I'm kind of confused.

The user selects A location and B location, but you don't want any records for B location to be retrieved??

Initially I thought changing the last two ANDs to ORs would do what you want, but now I'm not sure.

(Incidentally you have a typo on DEPARTMENT in the last line.)

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Silver Member
posted Hide Post
Hi,

Sorry perhaps a "chart" would be easier to understand

Using this as an example:
Location Possible Values: A B C D E F G
Program Possible Values: 1 2 3 4 5 6 7
Department Possible Values: T U V W X Y Z

So let's say my end user selects
Location: A B
Program: 1
Department: T U

I would like to show the records where ANY of those conditions are met
so a record with Location A, Program 2 Department V will still show
A record with Location B Program 1 Department V will still show
A record with Location G, Program 7, Department T will still show
A record with Location G, Program 1, Department Z will still show

I hope this clarifies.


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Virtuoso
posted Hide Post
As far as I can understand your request, change AND by OR :
AND ( ( FACT_RISKPRO.FACT_RISKPRO.LOCATION EQ &LOCATION.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.LOCATION IN FACT_RISKPRO)).LOCATION:. )
OR ( FACT_RISKPRO.FACT_RISKPRO.PROGRAM EQ &PROGRAM.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.PROGRAM IN FACT_RISKPRO)).PROGRAM:. )
OR ( FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT EQ &DEPARTMENT.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT IN FACT_RISKPRO)).DEPARTMNENT:. ) );


And I suggest to put brackets to enclose the ORs


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
Silver Member
posted Hide Post
Nope it is not working, I think it is still treating it as show the records that have that exact combination of Location/Program/Department, and not treating them independently.


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Virtuoso
posted Hide Post
With proper ORs and brackets it shouldn't.

Share your whole code.


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
Silver Member
posted Hide Post
Hi,

The code is pretty simple I think:


TABLE FILE FACT_RISKPRO
PRINT
FACT_RISKPRO.FACT_RISKPRO.PATIENT_ID
FACT_RISKPRO.FACT_RISKPRO.PATIENT_STATUS
FACT_RISKPRO.FACT_RISKPRO.PATIENT_NAME
FACT_RISKPRO.FACT_RISKPRO.PATIENT_CITY
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_STATUS
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_SEVERITY_LEVEL
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_SEVERITY_DESCRIPTION
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE
FACT_RISKPRO.FACT_RISKPRO.INJURED
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DESCRIPTION
FACT_RISKPRO.FACT_RISKPRO.INCIDENT_OCCURED_WHEN
FACT_RISKPRO.FACT_RISKPRO.LOCATION
FACT_RISKPRO.FACT_RISKPRO.PROGRAM
FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT
FACT_RISKPRO.FACT_RISKPRO.RESOLUTION
FACT_RISKPRO.FACT_RISKPRO.REPORTED_BY
FACT_RISKPRO.FACT_RISKPRO.REVIEW_MANAGER
FACT_RISKPRO.FACT_RISKPRO.OTHER_SERVICES_INVOLVED
FACT_RISKPRO.FACT_RISKPRO.INPATIENT_LOCATION
FACT_RISKPRO.FACT_RISKPRO.COUNT
WHERE ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE GE '&START_DATE_yyyymmdd' ) AND ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE LE '&END_DATE_yyyymmdd' ) AND ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE EQ '&INCIDENT_TYPE.(FIND FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE IN FACT_RISKPRO).INCIDENT_TYPE:.' ) AND ( FACT_RISKPRO.FACT_RISKPRO.LOCATION NE &LOCATION.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.LOCATION IN FACT_RISKPRO)).LOCATION:. ) AND ( FACT_RISKPRO.FACT_RISKPRO.PROGRAM EQ &PROGRAM.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.PROGRAM IN FACT_RISKPRO)).PROGRAM:. ) AND ( FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT EQ &DEPARTMENT.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT IN FACT_RISKPRO)).DEPARTMENT:. );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=REPORT,
COLUMN=N3,
WRAP=6.000000,
$
ENDSTYLE
END


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Virtuoso
posted Hide Post
Look simple, but you haven't perform what we've suggested you.

Instead of :
WHERE ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE GE '&START_DATE_yyyymmdd' )
 AND ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE LE '&END_DATE_yyyymmdd' )
 AND ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE EQ '&INCIDENT_TYPE.(FIND FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE IN FACT_RISKPRO).INCIDENT_TYPE:.' )
 AND ( FACT_RISKPRO.FACT_RISKPRO.LOCATION NE &LOCATION.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.LOCATION IN FACT_RISKPRO)).LOCATION:. )
 AND ( FACT_RISKPRO.FACT_RISKPRO.PROGRAM EQ &PROGRAM.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.PROGRAM IN FACT_RISKPRO)).PROGRAM:. )
 AND ( FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT EQ &DEPARTMENT.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT IN FACT_RISKPRO)).DEPARTMENT:. );


Try :
 WHERE ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE GE '&START_DATE_yyyymmdd' )
 AND ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE LE '&END_DATE_yyyymmdd' )
 AND ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE EQ '&INCIDENT_TYPE.(FIND FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE IN FACT_RISKPRO).INCIDENT_TYPE:.' )
 AND (
       ( FACT_RISKPRO.FACT_RISKPRO.LOCATION NE &LOCATION.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.LOCATION IN FACT_RISKPRO)).LOCATION:. )
    OR ( FACT_RISKPRO.FACT_RISKPRO.PROGRAM EQ &PROGRAM.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.PROGRAM IN FACT_RISKPRO)).PROGRAM:. )
    OR ( FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT EQ &DEPARTMENT.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT IN FACT_RISKPRO)).DEPARTMENT:. )
	 );


Or what I prefer:
 WHERE ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE GE '&START_DATE_yyyymmdd' );
 WHERE ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_DATE LE '&END_DATE_yyyymmdd' );
 WHERE ( FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE EQ '&INCIDENT_TYPE.(FIND FACT_RISKPRO.FACT_RISKPRO.INCIDENT_TYPE IN FACT_RISKPRO).INCIDENT_TYPE:.' );
 WHERE ( FACT_RISKPRO.FACT_RISKPRO.LOCATION NE &LOCATION.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.LOCATION IN FACT_RISKPRO)).LOCATION:. )
    OR ( FACT_RISKPRO.FACT_RISKPRO.PROGRAM EQ &PROGRAM.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.PROGRAM IN FACT_RISKPRO)).PROGRAM:. )
    OR ( FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT EQ &DEPARTMENT.(OR(FIND FACT_RISKPRO.FACT_RISKPRO.DEPARTMENT IN FACT_RISKPRO)).DEPARTMENT:. );

Because this allow the use of FOC_NONE without issue of having the whole WHERE ignored. So that way some parameters can have FOC_NONE (first 3) when some others don't.


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
Silver Member
posted Hide Post
Sorry I had posted the original before I tried to fix it but thanks it works now!


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Virtuoso
posted Hide Post
Edit your first post then edit title to add [SOLVED] at the beginning.


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
  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]Multiselect Independent

Copyright © 1996-2020 Information Builders