Plog_Dougules
asked on
Composing Links with Server Context
I have a form with a rich text field where notes client users enter pass-thru HTML to compose links to other documents in the same database which is widely viewed as an intranet web site. The database recently has been replicated to another server. The existing pass-thru links included the original server name hardcoded like this:
<a href = "http://OriginalServerName/FolderName/DatabaseName.nsf/0/DocumentIDNumber"> LinkDisplayText</a>
These links need to be changed to determine the correct server like this:
<a href = "http://CurrentServerName/FolderName/DatabaseName.nsf/0/DocumentIDNumber"> LinkDisplayText</a>
Where CurrentServerName accurately reflects the server on which the current page is being viewed.
I've tried computed text which seems to be ignored as pass-thru. I've enclosed it in square brackets and I get funny </font> tags in my composed URL.
I'd be glad to post all the things I've tried if anyone thinks it might help.
Thanks!
-Plog
<a href = "http://OriginalServerName/FolderName/DatabaseName.nsf/0/DocumentIDNumber"> LinkDisplayText</a>
These links need to be changed to determine the correct server like this:
<a href = "http://CurrentServerName/FolderName/DatabaseName.nsf/0/DocumentIDNumber"> LinkDisplayText</a>
Where CurrentServerName accurately reflects the server on which the current page is being viewed.
I've tried computed text which seems to be ignored as pass-thru. I've enclosed it in square brackets and I get funny </font> tags in my composed URL.
I'd be glad to post all the things I've tried if anyone thinks it might help.
Thanks!
-Plog
ASKER
Thanks for the answer. It seems like a reasonable alternative which should have been considered at design time. The problem is that these links are created at run-time inside a rich text field using the Notes client. I don't think you can insert computed text fields into a rich text field at run-time.
Specifically, these links are on a regularly published "new page" and refer to other "new pages." Hence their number and placement will vary from time to time.
Specifically, these links are on a regularly published "new page" and refer to other "new pages." Hence their number and placement will vary from time to time.
Have you tried getting the people to create hotspots with formulas like..
DOCID:=<DOCID>;
DBURL:=@ReplaceSubString(@ Subset(@DB Name;-1);" \\";"/");
@URLOpen("/" + DBURL +"/0/ + DOCID)
Where <DOCID> is the documentid that you want to link to
??
DOCID:=<DOCID>;
DBURL:=@ReplaceSubString(@
@URLOpen("/" + DBURL +"/0/ + DOCID)
Where <DOCID> is the documentid that you want to link to
??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Does access to the formula box for the action hotspot depend on whether someone has designer access?
-Plog
-Plog
No ... As an author you have access to the hotspot formulas inside a rich text field...
U can solve ur problem by using computed text field instead of hard coding the value of the link.
Example:
<a href = {Text Field}> LinkDisplayText</a>
The text field which i have placed inside the curly braces should actually be a notes text field and the default value of which can be computed using @formulas. The whole thing can be passed through HTML. This will surely work. I have done it myself.
Note: Use @DbName in the value of the computed text field to get the server name and the database name.
Best of luck
Amit