Working with @DocumentUniqueID and Richtext Field

Hi,

I created a view button that will prompt a user to pick a document via @Picklist. The return value will be the unique ID of the selected document. It should then paste that value as a doclink in a richtext field of the selected document in the view.

Here’s the button formula:

choice:=@PickList( [Custom]: [Single] ; “” ; “project_picklist” ; “Select a project” ; “Select the project to which you want to link this email.” ; 4 );

@SetField(“linkedto”; @GetDocField(choice; “docUNID”))

linkedto is a richtext field in the documents contained in the view and docUNID is a computed richtext field in another document where the selected view document will link to and has a computed value of @DocumentUniqueID.

But what I get is a null… the linkedto field gets no value.

How would solve this problem? Any help please…

Thanks a lot.

Subject: Working with @DocumentUniqueID and Richtext Field

I’ve never seen doclinks done that way before. I think that a Doclink is more than just a UNID value…

I would use then UNID to get a NotesDocument object pointing to the document you want to link to, and then use the notesRichTextItem.AppendDocLink method to create the doclink.

Subject: Working with @DocumentUniqueID and Richtext Field

In all probability, your problem is coming from the fact that you are working with richtext fields. As you should know, richtext values are not accessible until the document is saved and reloaded (from Help - Updates to rich text items accessed through NotesUIDocument are not immediately incorporated into the NotesUIDocument object. You must close and open the document to see the updates.)