Is it possible to open a Picklist from a Dialogbox

The title says it all. I’m wondering if it’s possible to open a Picklist from a button on a Dialogbox form. I thought I had it working using (with just simple @Dialogbox and @Picklist) but then it stopped working. That is, when the Picklist opens the Dialogbox form that opened it closes.

Thanks.

Subject: Yes

I’m wondering why you seem to have issues with it. Could you be more specific regarding your code?

Subject: Which leads me to wonder, what triggers the dialog box to close?

What else is on the dialog box? Why would it close?

I can’t remember why but I’ve run into something like this. I believe you that the dialog box closes; I just don’t remember why.

Oh, one other thing – in the formula you’re setting the item to the string “sContent”, not the variable sContent. Should be:

@SetField(“itemname”; sContent)

Subject: Here’s the code I’m using

I’m opening the Dialogbox using the Queryopendocument event of a view.

Dim doc as NotesDocument
Dim ws as New NotesUIWorkspace
Set doc = Source.Documents.GetFirstDocument()
If not doc is Nothing then
Call ws.Dialogbox(“Item”, True, True, True, False, False, False, “My Item”, doc, True, True, True)
End If
'Set Continue to false to prohibit opening of the document
Continue = False

The dialogbox opens fine and displays the data. Now, on the dialogbox form there is a button to open a Picklist so I can pick a different item. I want my selection to populate the ItemName field on the dialogbox.

Here’s the code for the button.

sContent:=@PickList( [Custom]:[Single] ; “” ; “ProductLookup” ; “Product Selector” ; “Select a product from the list”; 4);
@SetField(“ItemName”;“sContent”)

The problem is, when I click the button on the dialogbox and the picklist pops open, the underlying dialogbox closes.

Subject: Hmm. Your code does work for me.

My apologies for being late to respond…

I tested your code and it seems to work fine for me. I.e., the selected [double-clicked] document opens in a dialog box as expected. Clicking the button on the dialog box opens a picklist without closing the dialog box.

I’m using Notes version 9.0.1 FP9 SHF123 on a Win10 Pro x64 box (all updates installed).