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] HYPERLINKS IN WF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] HYPERLINKS IN WF
 Login/Join
 
Gold member
posted
Hello. Does anyone know the syntax to create a hyperlink in WF for a define field? I have figured out how to link the entire column but I only want one word within a paragraph to be linked.
For example, suppose I want the word "Office" to be hyperlinked below in PARAGRAPH1.
-*********************************************
DEFINE FILE PERSON_DETAIL
hyperlink/A150='http://www.google.com';
open_caret/A1='<';
closed_caret/A1='>';
full_link/A200=open_caret || 'A source=' || hyperlink || 'closed';
PARAGRAPH1/A1000 = IF LAST_NAME EQ 'Smith' THEN 'Contact this office: Residency Determination Office';
END

This message has been edited. Last edited by: Kathleen Butler,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Expert
posted Hide Post
What is the output format ?

You should also add an ELSE to the end of the PARAGRAPH1 DEFINE.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
If you're talking hyperlinks then I guess you mean HTML or MS Excel output?

Try this -
DEFINE FILE EMPDATA
  FULLNAME/A101 = LASTNAME || ', ' | FIRSTNAME;
  HYPERLINK/A100 = IF LASTNAME IN ('ADAMS','MORAN','SMITH','WHITE') THEN '<a href="www.google.co.uk">Please search the web</a>' ELSE '';
END
TABLE FILE EMPDATA
PRINT FULLNAME
      HYPERLINK AS ''
   BY DEPT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE endeflt
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Building on the previous:
  
-* File phoenix01.fex
DEFINE FILE CAR
HYPERLINK/A40 ='<a href="www.google.com">AUTO</a>';
XMODEL/A64=STRREP (24, MODEL, 4, 'AUTO', 40, HYPERLINK, 64, 'A64');
END
TABLE FILE CAR
PRINT XMODEL
BY COUNTRY BY CAR
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
If you want something that will suit all the popular output formats (HTML, PDF, Excel) then this code should suit -
SET NODATA = ''
DEFINE FILE EMPDATA
  FULLNAME/A50V = LASTNAME || ', ' || FIRSTNAME;
  HYPERLINK/A100 MISSING ON = IF LASTNAME IN ('ADAMS','MORAN','SMITH','WHITE') THEN 'Search for ' | FULLNAME ELSE MISSING;
END
TABLE FILE EMPDATA
PRINT FULLNAME
      HYPERLINK AS ''
   BY DEPT
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<MS Excel 2000,EXL2K>,<MS Excel 2007,EXL07>).Choose format.
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=HYPERLINK, URL=http://www.google.co.uk#(q=FULLNAME), TARGET=_BLANK, $
ENDSTYLE
END

Thanks to Francis for this idea in this post brought out using a search on "hyperlink html excel".

#T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Thank you. This is all helpful. I will give it a try.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Gold member
posted Hide Post
Let me try this again. Below is an actual piece of my DEFINE. I'm defining this PARAGRAPH5 and I want the Residency Determination Office to be a hyperlink in the Excel output.
-*********************************************
PARAGRAPH5/A1000 = IF F8 EQ 'RE_2YR' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this is incorrect, you must fill out a residency application and submit it to the 'a href="http://resdetermination.uncc.edu/">Residency Determination Office.'
ELSE
IF F8 EQ 'RE_DYDPT' THEN 'Do not enroll at UNC-Charlotte for 24 consecutive months. At that time you would be eligible for readmission using the Two Year Rule.'
ELSE
IF F8 EQ 'RE_DEGREE' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this incorrect, you must fill out a residency application and submit it to the Residency Determination Office.'
ELSE
IF F8 EQ 'RE_SD' THEN 'We wish you the best of academic success upon your return to UNC-Charlotte. If you have questions, please call Melissa ***** at 704/555-5555.'
ELSE '';


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Virtuoso
posted Hide Post
Your text should read something like this:
  
PARAGRAPH5/A1000 = IF F8 EQ 'RE_2YR' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this is incorrect, you must fill out a residency application and submit it to the <a href="http://resdetermination.uncc.edu/">Residency Determination Office</a>.'

etc...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
To get the hyperlink to function in MS Excel you will have to resort to using the URL drill down styling as I mentioned earlier. However, you cannot cause a part of the cell to contain a hyperlink - it is either the entrie contents or none.
SET NODATA = ''
DEFINE FILE EMPDATA
  FULLNAME/A50V = LASTNAME || ', ' || FIRSTNAME;
  HYPERTEXT/A500 MISSING ON = IF JOBCLASS EQ '064PSA' THEN 'Your Job Class is ' | JOBCLASS || '. Please click to goto Google'
                         ELSE IF JOBCLASS EQ '064PSB' THEN 'Your Job Class is ' | JOBCLASS
                         ELSE IF JOBCLASS EQ '257PRA' THEN 'Your Job Class is ' | JOBCLASS
                         ELSE MISSING;
  FLAG/A1 = IF JOBCLASS EQ '064PSA' THEN 'Y' ELSE 'N';
END
TABLE FILE EMPDATA
PRINT FULLNAME
      HYPERTEXT AS ''
      FLAG NOPRINT
   BY DEPT
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<MS Excel 2000,EXL2K>,<MS Excel 2007,EXL07>).Choose format.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  DEFMACRO=COND0001, MACTYPE=RULE, WHEN=N4 EQ 'Y', $
TYPE=REPORT, GRID=OFF, SIZE=9, $
TYPE=DATA, COLUMN=HYPERTEXT, TARGET='_BLANK', WHEN=N4 EQ 'Y',
     URL=http://www.google.co.uk, ALT='Goto Google',
$
ENDSTYLE
END

T

Edited in error Frowner



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] HYPERLINKS IN WF

Copyright © 1996-2020 Information Builders