Leaving aside questions about why you're not using related records and/or container fields for this...
I've gone down the path before of trying to have the user click into a return-separated list and then run a script based on where they clicked. I got it to work, using Get ( ActiveSelectionStart ) and Get ( ActiveSelectionSize ), but it was clunky and "fiddly".
Perhaps a slightly different approach:
- Make a value list of the field based on a self-join
- Show a checkbox set (or radio buttons) based on that value list, with a utility global field (it could be the same for all the fields, since you're only storing their selection there long enough to retrieve it)
- Format the checkboxes/radio buttons to be essentially invisible
- Put an onObjectModify script trigger on the field that captures the item they selected, then clears and leaves the field.
One limitation is that you won't be able to have a scroll-bar, but that's kind of the deal killer for the other method, too, since scrolling the field "enters" it.
Thanks Chris. The self-join and the value list worked great. The only problem (minor) that exists now is that when one of the text fields is blank, the value list shows "<no values defined>". Is there a way to modify that statement - like "<No Documents>"?
Never mind - the solution came to me. Use Hide to hide the field if there's nothing to show. That avoids the value list message.