URL Link in $$Return

The following $$Return formula is intended to provide a link to a document being processed on the web.

docURL := @GetHTTPHeader(“Host”) + “/” + @WebDbName + “/” + “ViewName” + “/” + @Text(@DocumentUniqueID);

MessageField + “

<a href="” + docURL + “">Return to document

”

The URL that’s assigned to docURL in this formula is valid. However, when the link is clicked, a “0/” is added to the front of the URL and the document is not displayed in the browser. Instead, the following error is displayed:

Error 404 - HTTP Web Server: Couldn’t find design note - 0/http://host/database/View/universalID?OpenDocument

I tried removing the “0/” by applying @Rightback to the formula, but this only removes characters in the URL and not the “0/”.

I’d appreciate any ideas on why the “0/” is being added to the front of the URL.

Thanks.

Subject: URL Link in $$Return

@Rightback works from the right back and returns everything to the right of the last instance of the test string, so if you use @Rightback(“/0/http://server/path/db.nsf/view/unid","/”), it chops off the unid.

Subject: Skip the host

If you’re opening a page on the current server try:

docURL := “/” + @WebDbName + “/” + “ViewName” + “/” + @Text(@DocumentUniqueID)