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.
I need to define a field that will look for the word Rush in a comment field and will equal 1 if it does and 0 if it does not
I am not trying to find only the record with Rush in it but just show which record have and which don't
Problem is that comment field can show " Please ship rush ", " this order is rush ", " Rush order " and so on as these comment are not always enter by the same user
This is something I never did before and help would be greatly appreciated
Thank you.This message has been edited. Last edited by: FP Mod Chuck,
In this example I'm flagging the records that have 'GER' in the field COUNTRY.
TABLE FILE CAR
PRINT COUNTRY CAR
COMPUTE GER_IN_COUNTRY/I2=POSITION('GER', COUNTRY); NOPRINT
COMPUTE RECORDS_WITH_GER/I2=IF GER_IN_COUNTRY NE 0 THEN 1 ELSE 0;
END
This message has been edited. Last edited by: BabakNYC,
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
TABLE FILE CAR
PRINT COUNTRY CAR
COMPUTE GER_IN_COUNTRY/I2=POSITION('GER', UPCASE(10, COUNTRY, 'A10')); NOPRINT
COMPUTE RECORDS_WITH_GER/I2=IF GER_IN_COUNTRY NE 0 THEN 1 ELSE 0;
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
MartinY has a point. I'd upcase the values before checking.
FYI, there's now a simplified UPPER(fieldname) function that's slightly easier than UPCASE.
TABLE FILE CAR
PRINT COUNTRY CAR
COMPUTE GER_IN_COUNTRY/I2=POSITION('GER', UPPER(COUNTRY)); NOPRINT
COMPUTE RECORDS_WITH_GER/I2=IF GER_IN_COUNTRY NE 0 THEN 1 ELSE 0;
END
Regarding CONTAINS, I agree that's another way of approaching the issue. You could also use LIKE. Many ways to get to the same outcome.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015