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] MAINTAIN using a multilist selection to filter a stack

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] MAINTAIN using a multilist selection to filter a stack
 Login/Join
 
Gold member
posted
I have a maintain form with a multilist that is filled using a stack.

I would like to use the selected values from the multilist box as a filter to filling another stack.

So the user selects a few things from that list and hits go; this calls a function that fills a stack as follows (BEG_DT and END_DT are also fields on my form):

For all next readmit_30_day.READMIT_30_DAY.RECORD_ID into stk
Where (DEPARTMENT IN ([selection list]))
AND (ADMIT_DT2 GE BEG_DT)
AND (ADMIT_DT2 LT END_DT);

I'm pretty sure I could fill this stack by passing these values from the form to a fex, then execing the fex into the stk, but I was wondering if there was any way of referencing this list of selected items directly in the where clause in maintain? Seems like a lot of extra work to go with the fex route, as I'm pretty sure I'll have to concatenate all the values into one string and one parameter since I don't know how many items the user might select.

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


WebFOCUS 7.7.2
Win2003
Excel, HTML, PDF
 
Posts: 61 | Registered: April 16, 2009Report This Post
Master
posted Hide Post
This can easily be done with Maintain.

Let's assume that DEPTSTK contains the list of selected departments. We loop through the selected values and load the proper records into the stack one selection at a time. We would do this:

compute i/i3=1;
repeat deptstk.foccount
reposition readmit_30_day.READMIT_30_DAY.RECORD_ID
For all next readmit_30_day.READMIT_30_DAY.RECORD_ID into stk(stk.foccount+1)
Where DEPARTMENT eq deptstk(i).department
AND (ADMIT_DT2 GE BEG_DT)
AND (ADMIT_DT2 LT END_DT);
compute i=i+1;
ENDREPEAT
Stack Sort STK by RECORD_ID

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
Awesome!

This worked beautifully except for one small thing. deptStk is my display list and thus has all the departments regardless of which ones I selected. I created a second stk, bound it to the selection result of my field, and then used it in the Where statement and I got exactly what I needed.

Thanks Mark!


WebFOCUS 7.7.2
Win2003
Excel, HTML, PDF
 
Posts: 61 | Registered: April 16, 2009Report 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] MAINTAIN using a multilist selection to filter a stack

Copyright © 1996-2020 Information Builders