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.
Standard styling will color whole strings, but I want to highlight where in a string a search match has occurred. eg we are searching for lmno and the result is
abcdefghijklmnopqrstuvwxyz
Has anyone come up with a nifty technique for doing this. I searched the forums and came up with diddley.
What would be awesome would be that it worked for html, pdf, exl2k, but HTML only would be enough.
Here's hoping
JohnThis message has been edited. Last edited by: Kerry,
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006
THANKS!! for getting my mind working this morning!!! Appreciate it...
You'll have to play around with the POSIT stuff when the string is in different places, AND, I couldn't get the dynamic field format to work in a DEFINE, BUT, this works:
-SET &SEARCH = 'lmno';
-SET &LEN = &SEARCH.LENGTH;
DEFINE FILE CAR
COL1/A26 = 'abcdefghijklmnopqrstuvwxyz';
COL1_A1/I2 = POSIT(COL1, 26, '&SEARCH', &LEN , 'I2');
COL1_A2/A4 = SUBSTR(26, COL1, COL1_A1, COL1_A1+3, 4, COL1_A2);
-******************************************************************
COL1_B1/I2 = IF COL1_A1 EQ 1 THEN &LEN ELSE COL1_A1 - 1;
COL1_C1/I2 = COL1_B1 + &LEN;
COL1_D1/I2 = IF COL1_C1 EQ 26 THEN 26 ELSE 26 - COL1_C1;
XFMT1/A8 = IF COL1_B1 EQ 0 THEN 'A' || EDIT(COL1_D1)
ELSE 'A' || EDIT(COL1_B1) ;
XFMT2/A8 = IF COL1_D1 EQ 0 THEN 'A' || EDIT(COL1_B1)
ELSE 'A' || EDIT(COL1_D1) ;
END
TABLE FILE CAR
SUM
XFMT1
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
ON TABLE SAVE
END
-RUN
-READ SAVE &XFMT1.A8.
-TYPE &XFMT1
TABLE FILE CAR
SUM
XFMT2
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
ON TABLE SAVE
END
-RUN
-READ SAVE &XFMT2.A8.
-TYPE &XFMT2
TABLE FILE CAR
SUM
COL1_A1
COL1_A2
COL1_B1
COL1_C1
COL1_D1
XFMT1
XFMT2
COMPUTE COL1_A3/&XFMT1 = SUBSTR(26, COL1, 1, COL1_B1, COL1_B1, COL1_A3);
COMPUTE COL1_A4/&XFMT2 = SUBSTR(26, COL1, COL1_C1, 26 , COL1_D1, COL1_A4);
COMPUTE SHOW_DATA/A300 = '<FONT color="black">' | COL1_A3 | '</FONT>' | '<FONT color="red">' | COL1_A2 | '</FONT>' | '<FONT color="black">' | COL1_A4 | '</FONT>';
BY COUNTRY
END
-EXIT
Ironically Francis' technique seems simpler but if you uppercase the string in order to do a case unsensitive search you still have to use Tom's technique to reinsert into the original not uppercased string.
I'm thinking as well along lines of letting wf do the work of generating a red class by putting a dummy entry into the styling sheet and using that in the class statements. That avoids the HTMLFORM but could be a bit risky seeing that the names of the styles .x1, .x2 etc could change.
Thanks for your ideas - both of you.
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006
BTW if you want PDF look alike with html try FORMAT DHTML.
Tried to do this
TYPE=DATA,COLOR=RED,WHEN=1 EQ 2, $
Hoping wf would define a class that it never uses but for a class to be in the HTML generated it needs to be referenced so it looks like -HTMLFORM it is.
Regards
John
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006