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     Counting the user input to determine where statement

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Counting the user input to determine where statement
 Login/Join
 
Gold member
posted
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
 
Posts: 71 | Registered: May 23, 2004Report This Post
Virtuoso
posted Hide Post
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, 2003Report This Post
Gold member
posted Hide Post
Thanks so much. I found ARGLEN function which was better. I tried with the .length first as well and it was good too.
Again thanks Mikey.


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
 
Posts: 71 | Registered: May 23, 2004Report This Post
Virtuoso
posted Hide Post
ARGLEN was the other method I was thinking of but did not mention it. I'm glad you found it.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
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, 2007Report 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     Counting the user input to determine where statement

Copyright © 1996-2020 Information Builders