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] SIMPLE HYPERLINK SYNTAX

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] SIMPLE HYPERLINK SYNTAX
 Login/Join
 
Gold member
posted
Hello. I am still having trouble figuring out how to include a simple hyperlink in my defined paragraph. I have a simple defined paragraph and I want one word within that paragraph to link to a webpage in the output. What is the syntax to do this? I can't imagine it's difficult but I don't have experience doing this and I can't seem to find anything concrete in the documentation. Help! Thanks

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Expert
posted Hide Post
DEFINE FILE CAR
COUNTRY_LINK/A200 = '<a href="http://www.google.ca/#hl=en&|output=search&|q=' || COUNTRY | '" target=win_google>' | COUNTRY | '</>';
END

TABLE FILE CAR
SUM
SALES
BY COUNTRY_LINK AS COUNTRY
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
NICE... Simple and Niceeeee....
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
I have my defined hyperlink:
-*******************
DEFINE FILE STEP2
HYPERLINK/A50 = 'Residency Determination Office';
END
-******************
Now, if I have a defined paragraph, not a column, how do I surround the neccessary word?


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Guru
posted Hide Post
I assume when you say surround the necessary word that you mean display a certain word as the hyperlink text. Depending on how your paragraph is going to be set up, simply use another define with a parsing function. If you could give us an idea of what these paragraphs are going to consist of, that would be helpful.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Gold member
posted Hide Post
J, yes, that is exactly what I'm speaking of. A certain word within the paragraph as the hyperlink text. Here is a sample paragraph that's very similar to what my actual paragraph will be. It's also a defined paragraph.
-********************************************
DEFINE
PARAGRAPH1/A1000 = IF F8 EQ '2-YR' THEN 'This is my test paragraph. This is the paragraph that will print in my output.'
END
-*********************************************


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Guru
posted Hide Post
So what are you going to be looking for in the paragraph? is it the F8 EQ '2-YR' or what? It looks like you will already have the part you need to be displayed in either a define or a variable. All you need to do is concatenate that define/variable into your Hyperlink define. ie:
 HYPERLINK/A50=''|| &yourvarible || '' 
Then for the paragraph Define, concatenate the hyperlink within the paragraph.

Basically we need to know how you are determining the "necessary word"


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Gold member
posted Hide Post
Within my defined paragraph I will have a sentence like "Please contact the Office of the Registrar for assistance." If I want to make the "Office of the Registrar" a link to the Registrar's home page, I will need to define that in my HYPERLINK/A50 = '||http://www.registrar.com||'.
Then what?


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Guru
posted Hide Post
Sorry it didn't show up correctly. I am assuming that Office of the Registrar or whatever value that is is coming from a variable or a field and that is the only part of that sentence that changes each time. You will have to create a hyperling (ignore my example above...) and concatenate the variable/column into the link as well as your target.
You will need to create static conditions for each value it looks like; example with if statement:
i.e. Hyperlink/A50 = IF &department EQ 'Registrar' THEN
 '<a href="http://www.registrar.com" target="_blank">' || 'Please contact the Office of the ' || &department || ' for assistance.' ELSE IF &department=...</a>' 

This may not be exactly your example, but you could use the code I have given you. If you have something similar to this, then you won't even need to define the paragraph. There are functions you can use instead of the if statements, but this will get you started.

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Gold member
posted Hide Post
Here's a styling example from the WebFOCUS documentation that may help you:

TABLE FILE GGSALES
ON TABLE SET PAGE-NUM OFF
SUM UNITS AND DOLLARS
BY CATEGORY BY REGION
HEADING
"Regional Sales Report"
"Click here to access the IB homepage."
" "
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $ 
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1,
   URL=http://www.ibi.com, $
ENDSTYLE
END


WF 7.1.6 moving to WF 7.7, Solaris 10, HTML,PDF,XL
 
Posts: 83 | Location: Dartmouth Hitchcock Medical Center | Registered: April 17, 2003Report This Post
Gold member
posted Hide Post
All of this is very helpful. Thank you and let me see what I can come up with.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Gold member
posted Hide Post
I was so close. I have my define stmts as such.
-********************************************
hyperlink/A150='Residency Determination Office';
open_caret/A1='<';
closed_caret/A1='>';
full_link/A200=open_caret || 'A source=' || hyperlink || 'closed';
-*********************************************
However, when I try to concatenate the text within the defined paragraph, it fails. What am I missing. I know I am so close.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Expert
posted Hide Post
Are you complicating things?

DEFINE FILE CAR
hyperlink/A150='<a href="http://resdetermination.uncc.edu" target="_blank">Residency Determination Office</a>';
END

TABLE FILE CAR
SUM 
SALES
hyperlink
BY COUNTRY
END

(Please always use code tags when posting code, because we cannot see your html.

[code]
your code here
[/code]


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Updated to include a paragraph:

DEFINE FILE CAR
hyperlink/A150='<a href="http://resdetermination.uncc.edu" target="_blank">Residency Determination Office</a>';
paragraph/A1000=
  'This is my paragraph. There is a country that requires a visit to the' ||
  (' ' | hyperlink || ', from where you may apply for a visa.');
END

TABLE FILE CAR
SUM
SALES
paragraph
BY COUNTRY
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Francis, you're great. I believe I was complicating things because I was getting so many different ways to do the link from many different people. I'm going to try your example since you showed how to concatenate within the paragraph. That was the part I was confused on. Thanks. I'll let you know if I do it right.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Gold member
posted Hide Post
Here is my defined paragraph. The concatenation is still not working.
DEFINE
PARAGRAPH3/A1000 = IF F8 EQ 'RE_SD2' 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 ' ' | hyperlink || '.'
ELSE ' ';
END


The report will run by the link is still not there.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Gold member
posted Hide Post
Correction. The paragraph prints like such:
"Your residency for tuition purposes is Out-Of-State. If you feel this incorrect, you must fill out a residency application and submit it to the Residency Determination Office."


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Gold member
posted Hide Post
Ignore that last entry. The HTML converted itself. It actually prints with all the html code. If only it would convert in Excel. Is there a setting that I need to use? I'm almost there.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Expert
posted Hide Post
Please provide the full define and table file code, within code tags.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
DEFINE FILE STEP2
hyperlink/A150='<a href="http://resdetermination.uncc.edu" target="_blank">Residency Determination Office</a>';
PARAGRAPH3/A1000 =  IF F8 EQ 'RE_SD' 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'  || ' ' | hyperlink ||' . '
ELSE '';
END
TABLE FILE STEP2
PRINT
NAME
ID
PARAGRAPH3
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Virtuoso
posted Hide Post
Did you mean to indeed hold this in Excel?
There is a possibility to port hyperlinks to excel, but it will mean that the entire cell will become a hyperlink, not just some few words in the cell, unless I'm mistaken. Consider this bit of code:
DEFINE FILE CAR
hyperlink/A150='<a href="http://resdetermination.uncc.edu" target="_blank">Residency Determination Office</a>';
PARAGRAPH3/A1000 =  IF COUNTRY EQ 'ENGLAND' THEN 'Your residency for tuition purposes is ' | 'Out-Of-State' ||
                    '. If you feel this incorrect, you must fill out a residency application and submit it to the'  ||
                    ' ' | hyperlink ||'.' ELSE 'Ok';
END
TABLE FILE CAR
PRINT
COUNTRY
PARAGRAPH3
ON TABLE HOLD FORMAT HTML
END
SET HTMLFORMTYPE=XLS
-RUN
-HTMLFORM HOLD
-RUN
Maybe someone else can take it from here and get you what you need?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Well, GamP, you are on to something. When I added the piece below to the end of my script, the output was HTML and the link was there. Perfect. Except I really needed the output to be in Excel. I'm learning something new everyday. Thanks

ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Gold member
posted Hide Post
THIS THREAD IS COMPLETE. I STILL DIDN'T GET IT TO PRODUCE EXCEL OUTPUT WITH THE LINK IN IT BUT I GIVE UP. THANKS


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 49 | Registered: May 11, 2011Report This Post
Expert
posted Hide Post
See Excel and URLs with Ampers


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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] SIMPLE HYPERLINK SYNTAX

Copyright © 1996-2020 Information Builders