Hi,
I just can’t figure out how to get the current selected value in a combox from the uidoc.
I have a combobox and a button. When the user clicks on the button LotusScript should use the value from the currently selected combobox in some code.
I can get ALL available options in the combox but not the selected one.
I would guess that it will work if I save the Uidoc and then retreive the document value. But if possible I would get this value directly from ui without having to save it first.
~Johannes
Subject: Get selected combobox value in uidoc
Is it always a new document (never saved) or is it saved and you edit the document?
Subject: RE: Get selected combobox value in uidoc
Its in a profiledoc. So never a new one…
Subject: RE: Get selected combobox value in uidoc
Try to use the OnChange Event (it works for the client since 6.x) and write the field value to a hidden field. Maybe you can get the selected value of the combobox from the hidden field.
Subject: Get selected combobox value in uidoc
Hi,
Try this…it will display the value of the uidoc field in a msgbox as u click on the button.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim xyz As String
Set uidoc = workspace.CurrentDocument
xyz= uidoc.FieldGetText( "FieldName" )
Msgbox xyz
End Sub
Thanks,
Amit Singh
Subject: RE: Get selected combobox value in uidoc
Wierd…
I have tried that and it returned the complete list of available options in the combobox.
Not only the selected one… But when I now tried it again it only returned the selected option.
I’m scratching my head and moves on on the code.
Thanks for getting me to try it again. =)
~Johannes
Subject: RE: Get selected combobox value in uidoc
Hi,
If you use profile documents there could be some cache issues. Try to restart Notes client and chech again.
From Designer help:
Profile documents allow for quick data retrieval, because they are cached while the database that stores them is open.
Konrad