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.
Hi All, I have a fex that I need to count user's input and determine where statement that uses EQ or LIKE etc. For example, If user enters ICECREAM, then this is the whole thing, if just I, then where statement will be something like this: WHERE PRODUCT LIKE 'I%' instead of WHERE PRODUCT EQ 'ICECREAM' etc. How do I get to this to determine the user only gives the first initial and not the whole thing? Thanks so much in advance!!
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
I assume all you need to do is count the number of characters in the value supplied by the user. You can do this a couple of ways. Using the .LENGTH operator on a Dialogue Manager variable is probably what you want to use.
-IF (&VALUE.LENGTH LT 8) THEN 'USE LIKE' ELSE 'USE EQUAL';
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Sounds like you found what you needed, but here's an idea we use that allows the user the always get what they're looking for. Anytime we use text input boxes as in your example, we also include a radio button set that has the options of "Begins with","Contains"," and "Equals exactly." This then is also a parameter which is passed to determine the WHERE statement. Begins with would be WHERE FLDNM LIKE 'I%' Contains would be WHERE FLDNM CONTAINS 'ICE' Equals exactly would be WHERE FLDNM EQ 'ICE CREAM' Dialogue Manager commands build the WHERE using the radio button parameter and the text box parameter. And we get the most efficient selection statement passed to the DBMS.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007