Dynamic checkbox options?

I have built an array (dynamic, in the background) and now I would like to offer the array to the user. The array has up to ~400 possibilities though chances are it would be <10 when built. I believe I cannot create a field for each element of the array (for the user to interact with = approve or reject), is that correct? So I was hoping I could populate the options for checkbox with the array and allow the user to select the items they approve. Would this be possible? If so could you offer some direction. I guess I could do an OKCANCELLISTMULT prompt for the items to approve. Does anyone have any other suggestions?TIA

Subject: dynamic checkbox options?

I think you want to indicate, for each element in the array, one of three states: “approved”, “rejected” or “no action”. A simple checkbox prompt isn’t good at that unless you put in two of them, one to select the accepts and the other to select the rejects. And two complete prompts would be a little inefficient.You could put two buttons on the form, “Accept selected” and “Reject selected”, and have each of them act on the selected values in the array, moving those values into other fields. Those left in the first array are the “no action” items.

Subject: dynamic checkbox options?

Sure – put the list of items into a hidden field, use that field as the options source, then let the document refresh. (You may want to save the options field along with the document so you don’t get edit problems later when the options might not be there.)

Subject: RE: dynamic checkbox options?

Hi StanThis works wonderfully in a form. However I have the approval process happen via a layout region and for some reason it doesn’t work there. Here’s the elements on the layout region

postOpen event

n = 0

Set s = New NotesSession

Set doc = source.document

Set db = s.currentDatabase

Set view = db.getView(“(NetworkAll)”)

Set checkName = New NotesName(s.username)

Forall x In doc.needApprovalGroups

Set lookDoc = view.getDocumentByKey(x, True)

If Not lookDoc Is Nothing Then

Forall y In lookDoc.owners

If y = checkName.Abbreviated Then

Redim Preserve groupsArray(n)

groupsArray(n) = x

n = n + 1

End If

End Forall

End If

End Forall

If n <> 0 Then doc.yourGroups = Arrayunique(groupsArray,5)

Call source.Refresh

source.gotofield(“Status1”)

yourGroups is a computedWhenComposed, multi-value, text field containing the value yourGroups. Which gets set via the above script. *this field is on the top of the form but not on the actual layout region.

accessTo is an editable checklist field with ‘use formula for choices’ and the formula is yourGroups and 'refresh choices on document refresh is checked. This is the field on the layout region that I want the user to interact with.

**I just tested moving the yourGroups field onto the layout region and it doesn’t seem to be populating via the postOpen. Then I added a button onto the layout region that runs the postOpen script and still the fields on the layout region didn’t populate.

Any thoughts why this wouldn’t work on a layout region? Anyone?

Thanks again!