I have a code in Dev Studio with a defined paragraph field. I simply want to add a hyperlink in the paragraph. How can this be done? I have succeeded in creating a standalone hyperlink in a completely blank procedure but no luck within the defined paragraph.
Thanks, PThis message has been edited. Last edited by: phoenixfox,
WebFOCUS 7.6 Windows, All Outputs
July 02, 2014, 05:34 PM
Waz
Can you post an example of your code so far ?
You should be able to, but it will involve manipulating the field.
The code is pretty lengthy. Here is one defined paragraph. -**********CODE BEGINS********************** 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 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 ''; -*****CODE ENDS****************************
When the Excel output is generated, I would like "Residency Determination Office" to be a hyperlink.
Thank you, P
WebFOCUS 7.6 Windows, All Outputs
July 03, 2014, 08:32 AM
stur0063
It does work as a link in html if you just add an anchor tag:
This isn't exactly what you want - but - it'd be easy to add another define column - and turn the whole colum into the link.
DALINK/A100='Residency Determination Office';
TYPE=DATA, COLUMN=N5, URL=http://www.cnn.com, $
Could then tweak message to say "submit it to the Residency Determination Office (link next column)"
webFOCUS 8207.15 WindowsServer 2019
July 03, 2014, 11:44 AM
Tony A
Hi Phoenix,
I know two years in an education establishment can be a long time but you posted the exact same question (with the same code snippet!) in June 2012 (link). I recognised the text for the link!
Did one of those solutions not suit?
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
July 07, 2014, 09:22 AM
phoenixfox
You're absolutely right Tony. I couldn't figure it out with the solutions provided and so I tabled it until now. Responders say what I can do but now how to do it. SO I will try stur0063's suggestion and see if I can get it to work this time. Thank you.
P
WebFOCUS 7.6 Windows, All Outputs
July 07, 2014, 10:52 AM
phoenixfox
What is the syntax for linking the column? I have the new defined column working fine.
P
WebFOCUS 7.6 Windows, All Outputs
July 07, 2014, 11:06 AM
vaayu
When you say "linking the column" do you mean this? Also when you said you like the hyperlink for "Residency Determination Office". You could use a conditional hyperlink on the column using WHEN statement. Hope it helps.
-***Paragraph5**************** PARAGRAPH5/A1000 = 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 ''; -****************************
-****Style******************* ON TABLE SET HTMLCSS ON ON TABLE SET STYLE *
TYPE=DATA COLUMN=HYPERLINK URL=http://www.resdetermination.uncc.edu, WHEN PARAGRAPH5='Residency Determination Office', $ --***********************************
Am I close?
P
WebFOCUS 7.6 Windows, All Outputs
July 07, 2014, 12:28 PM
Tony A
Are you determined that the entire cell for PARAGRAPH5 is not to be the link and to have a separate cell for containing the link?
If so then I would suggest something like this -
DEFINE FILE yourfile
HYPERLINK/A30 MISSING ON = IF F8 IN ('RE_2YR','RE_DEGREE') THEN 'Residency Determination Office' ELSE MISSING;
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 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 '';
END
TABLE FILE yourfile
[verb] PARAGRAPH5 AS ''
HYPERLINK AS 'Links'
BY field etc.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=HYPERLINK, URL=http://www.resdetermination.uncc.edu,
WHEN=HYPERLINK EQ 'Residency Determination Office', $
ENDSTYLE
END
-RUN
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
July 07, 2014, 01:37 PM
phoenixfox
Well, the above by Tony gives me output. However, no hyperlink. I'm not opposed to trying the other method (entire paragraph link) I wasn't sure about the syntax.
WebFOCUS 7.6 Windows, All Outputs
July 07, 2014, 04:23 PM
phoenixfox
I also found out that even if I get the hyperlink in a separate defined column, when I mail merge it to a Word doc, the hyperlink is deactivated.
P
WebFOCUS 7.6 Windows, All Outputs
July 10, 2014, 02:53 PM
phoenixfox
Hello. Can anyone shed any light on why the hyperlink is not active when merging the Excel file into a Word document? I'm doing a mail merge and inserting the merged fields.
Thanks, P
WebFOCUS 7.6 Windows, All Outputs
July 11, 2014, 04:20 AM
Wep5622
I know nothing of merging Excel files into Word documents, I assume you're using some kind of external (to WF) product for that? It's quite possible that that product strips out your URL; you'll have to ask the vendor about that.
If not and if your link target is a WebFOCUS procedure, did you SET FOCEXURL = 'http://your.company.com/' in your procedure?
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 :
July 16, 2014, 09:49 AM
phoenixfox
Wep5622, I didn't SET FOCEXURL = ''
I'll play around with it and see if I can somehow keep the hyperlink when merging the Excel in the Word document.