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] limiting the customselect1_selectto to a number

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] limiting the customselect1_selectto to a number
 Login/Join
 
Platinum Member
posted
I am currently using 7.6.9.
I am trying to use a Double List Control.
The customselect1_selectfrom has multiple values. I want to be able to limit the number of selectable items in the customselect1_selectfrom's to 5. So as the user highlights an item and adds(+) it to the customselect1_selectto list they can only have 5 items in the customselect1_selectto. Is this possible?

Thanks,
Erin

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


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Gold member
posted Hide Post
Hello Erin....

You can count the number of entries by using JavaScript. A block of JavaScript code like this should do that.

function validate()
{
var maxCount = 5;
var limit = document.getElementById("customselect1_selectto").length;
if(limit > maxCount)
{
alert("Maximum number of selections is "+maxCount+", please retry");
return false;
}
return true;
}

To fire the JavaScript, you can put a onclick event on the submit button,

onclick="return validate()"


WebFocus 7x, 8x, Win / Linux, any output format
 
Posts: 70 | Location: reading, pa | Registered: April 07, 2007Report This Post
Platinum Member
posted Hide Post
JNC thanks for the reply. I will give it a try.


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Member
posted Hide Post
Thread Resurrection!! I want to do the exact same thing as the OP. However, when I put the code in the OnClick button to run the report, the message pops up but the report still runs. Is there a way to cancel the report running?

Ideally, I would like to inform the user sooner that they have selected too many, and not even let them select too many to begin with, by giving the message when the first option over the limit is added to the right list box. I was looking at using the onclick of the double list box Add button, but the user can double click options in the left list box to add to the right, so that would not consistently capture the scenario.

Any other ideas?

Thanks-
Ryan N


WF: WebFocus 8.0.02
InfoAssist, Dev Studio, Magnify, Portal/Dashboards, Mobile Favs
Data: DB2
OS: Windows
Output: Multiple
 
Posts: 23 | Location: KC, MO | Registered: August 05, 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] limiting the customselect1_selectto to a number

Copyright © 1996-2020 Information Builders