How do I acquire a list item value in computed field by CLICKING it?

I have a computed field for which the formula is @ThisValue, which allows me to use a button formula to assign list values to it without it resetting every time I open the document.

The button formula uses @PickList to present a list of values created using another form - the user can select multiple values, which are then inserted into my computed field. I have code to handle duplicate selections, as well as to append new selections to the existing list.

All this works fine…

What I’d like to do is be able to click on one of the list values in my computed field and open the form/record for that list value (to make it easier for my users to access additional information on the second form).

I’ve searched Domino Help, as well as here, but don’t see any way to make this happen. It may be that I need to use a different strategy to accomplish this… I was trying to avoid having to set up grand-child docs (the form in which my computed field lives is a child doc already).

Any suggestions?

es

Subject: RE: How do I acquire a list item value in computed field by CLICKING it?

There’s a ‘Computed when composed’ field type that lets you assign the field and it retains its value without your having to uselessly evaluate a formula all the time.

Or, you can just assign an item without having a corresponding field at all; this is even more efficient, and it is what you should do here. This “background field” will not change unless code changes it.

Then you can refresh the form. This will cause the keyword formula of a listbox field to be evaluated (because you have enabled the field option to recalculate keywords on refresh). The keyword formula gets its list of choices from the background field. Now, you can use the field’s Onchange event to trigger code that takes the selected value, finds the corresponding document, and uses EditDocument method to open it.

This will work in edit mode. For read mode you could hide the field and use a Computed Text to generate passthru HTML – again referring to the background field – containing the list of choices as anchor links. Use the Notes URL syntax to create links to the documents by their keys.

Actually the passthru HTML option should work in edit mode too – but it only updates when the document is loaded, so after the user changes the list, you would have to close and reopen the document if you wanted to get the updated list of links immediately. In the Update rich text tip I show how to close and reopen the document without saving it.

Using that same tip, you also have the option to write your choices into a computed rich text field with doclinks. In fact, unless you need the list stored somewhere else, you could write them only in the rich text field. It’s easy enough to read the values out of that field if you need the list while editing (however, if you need them in a view, you still need a background summary field with a copy of the selections).

Subject: RE: How do I acquire a list item value in computed field by CLICKING it?

Thanks for the suggestion, Andre. Most of that was way over my head (grin), but I’ll try to parse it down and see what I can figure out.

I guess the main thing I’m looking for is a way to display a list so that the user can click on a list item and have the corresponding document open up (using a different form). It looks like “links” are the (or at least, one) way to do that, but having never used them before, I’m not sure how to turn a text field containing a list into something clickable.

Thanks again,

es