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 - Listbox - Multiselect

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Maintain - Listbox - Multiselect
 Login/Join
 
Gold member
posted
Good morning,

I have an application that uses Maintain to provide the user with a form to select records based on one or more selection criteria. The form has a variety of controls some of which are listboxes. These are multi-select listboxes. The application works well and now I wish to extend the usability to the business users by "pre-filling" the form with the last selections chosen when the form is displayed. For these multi-select listboxes, I use the following syntax which doesn't highlight the first and second items in the listbox.

Winform Show_Inactive FormSearch;
FormSearch.ListBoxIncidentType.SelectedItems(1) = "Hello";
FormSearch.ListBoxIncidentType.SelectedItems(2) = "World";

The Developing WebFocus Maintain Applications document states this technique but the description of each section is not in sync with the entire command structure. I'm using version 7.7.03.

Any ideas?

Thanks...

Nick

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
 
Posts: 83 | Registered: February 26, 2009Report This Post
Virtuoso
posted Hide Post
If you can't make that run, I would not rule out cookies, which are easy to code and remarkably useful for this kind of thing. I used them to retain the width of table columns on Maintain forms and the end users absolutely loved it.

Include a unique name of the form in the cookie and the items selected for each drop down. Use JavaScript to pre-highlight once the form is loaded.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Gold member
posted Hide Post
Hi John,

Cookies may not work here due to the potential volume of pre-selected choices a user can make plus the number of listboxes and other controls - 19 in total. Do you see anything wrong with the syntax I used?

Thanks...

Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
 
Posts: 83 | Registered: February 26, 2009Report This Post
Master
posted Hide Post
Nick
While I am not sure why that technique isn't working, I'm going to give you an even easier way to do this. The method is, you assign an output stack to the Multi-select List box and preset the values that you want selected in there. I will give you a dynamic and a static example.

Dynamic - I am filling a listbox with the titles from the movies file:

MAINTAIN FILE movies
Case Top
for all next moviecode into liststk
reposition moviecode
infer moviecode into outstk
compute outstk(1).title = 'JAWS'
compute outstk(2).title = 'CABARET';

Notice that liststk contains ALL the titles while outstk, infered from the Movies file, has two values selected. This can be done dynamically, in a loop, from the database.
When you create the list box, select Multiselect = YES and assign Outstk.title to the SelectedItems parameter. When you run, the values listed in Outstk with highlight in liststk.

Static - I am adding these names to my listbox:

ART
DAN
NOREEN
MARK
JUDY
RENEE

I then create outstk2 in my code:

Compute outstk2.names/a10;
compute outstk2(1).names = 'MARK';
compute outstk2(2).names = 'RENEE';

I select Multiselect for the list box and assign outstk2.names as the SelectedItems parameter of the static list box. Now when you run, the two names listed in outstk2 are highlighted on the multi-select list box.

I hope this helps.
Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
Hi Mark,

The first method works perfectly and it's very logical.

Thank you...

Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
 
Posts: 83 | Registered: February 26, 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 - Listbox - Multiselect

Copyright © 1996-2020 Information Builders