Cannot open doc via URL using form formula in Notes client

Hi all,

I am trying to build a URL that will open a document via a named view in order to use the Form Formula of that view.

The link is displayed in a Notes document in a computed text using Passthrough HTML. The document being opened is in the same database as the document containing the link.

If I use the unid of the document (eg. notes:///path/filename.nsf/ViewName/unid?OpenDocument) the doc opens ok, but the form formula in the view is not triggered (ie. it opens using the document’s form, instead of the alternative named in the Form Formula).

If I use a key for the document (matching the first sorted column of the view) (eg. notes:///path/filename.nsf/ViewName/DocKey?OpenDocument) I get the error “The document specified by the link cannot be located within the linked-to database.”

However, if I manually open the view, and type in the exact same key in the quick find, it jumps straight to the document in question. And if I manually open it from the Notes client, the form formula works correctly.

Am I missing something? From other posts it seems that this is something that should work ok. I have formatted it correctly as per the doco (as far as I can tell). Are there any database settings that I should turn on / off? Anything else?

Any ideas would be warmly appreciated.

thanks,

Tim

Subject: Cannot open doc via URL using form formula in Notes client

I too have been trying to get this to work, the reason being that I wanted to show however many documents associated with the current document, with a link to ‘delete’ the document if the user had the created that document. Because of the formatting and the need to show/hide the link to delete a given document it needed to be pass-thru HTML. From all the posts I’ve looked at, query strings cannot be passed in a notes protocol link. So I wanted to have link that opened the document from a specific view, the view had a form formula pointing to a form that had QueryOpen code to flag the document for deletion.

I too had lots of problems opening the relevant document using the form formula, and finally got it working with a theory based on scraps of information from other posts. What you need to do is to access both the view and the document using the UNIDs, not names or keys, so call notes://server/path/filename.nsf/viewID/docID. The view’s UNID does not get changed of you refresh the design down onto a test or production database, so this seems to work.

Subject: RE: Cannot open doc via URL using form formula in Notes client

Thanks for the tip, it works great.

By putting the unid of view into the notes:// url, it allows you to access the Form Formula for the desired view.

If you want to use hidewhens in your document, you can base it off of @viewTitle.

Subject: Thank-you Paul Withers! Your solution works like a charm (eom)