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] String Contains

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] String Contains
 Login/Join
 
Gold member
posted
I have a variable that is populated from a multipal select element on a web page. The value is set like this '01a' OR '01b' after submitted. I take that variable and strip out all of the ' and the word(s) OR leaving me with 01a01b. I need to be able and use this variable to test and see it if contains 01a or 01b.

Code example:


-* &SELECTED_SECTION = 01a01b

-REPEAT SECTION_LOOPER FOR &loop FROM 1 TO 19

-SET &SECTION = DECODE &loop ( 1 '01a' 2 '01b' 3 '01c' 4 '02a' 5 '02b' 6 '02c' 7 '03' 8 '04' 9 '05' 10 '06' 11 '07' 12 '07a' 13 '07b' 14 '08' 15 '09' 16 '09a' 17 '09b' 18 '10' 19 '11');

-SET &SHOW_SECTION = IF &SELECTED_SECTION CONTAINS &SECTION THEN 'YES' ELSE 'NO';

-TYPE &SHOW_SECTION

-SECTION_LOOPER


When I run the code and it tries to executes the if contains statement I get this error: (FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR

When &SELECTED_SECTION is set to just 01a the code works correctly. Anyone have a suggestion?

Daniel

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


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Virtuoso
posted Hide Post
Works here on 7.7.

Did you remove the -SET command in that commented-out line on purpose or is that perhaps where your error originates?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Gold member
posted Hide Post
the -* &SELECTED_SECTION = 01a01 is just to show the format of the variable. I have set it before the loop.


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
Im in 7.6.8 and we still have a 12 character limit to label names
so i changed your SECTION_LOOPER to section_loop
and it ran fine.
but also, do this:
-SET &SHOW_SECTION = IF &SELECTED_SECTION.QUOTEDSTRING CONTAINS &SECTION.QUOTEDSTRING THEN whatever
Use the .QUOTEDSTRING, its just good policy.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
.QUOTEDSTRING worked thank you!


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report 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] String Contains

Copyright © 1996-2020 Information Builders