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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


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