Selecting items in Listbox using (LotusScript)

Hi, can any one assist me in selecting the items (checkboxes) in list box using lotus script code…

i wrote it in formula language

@SetField(“dvwithcheckbox”; tmpMngDevices);

where dvwithcheckbox is the listbox and

tmpMngDevices is the Names field with some items

iwrote the same in lotus script

Evaluate({@SetField(“dvwithcheckbox”; tmpMngDevices);})

but not getting output…

Thanks in Advance for help

Subject: Selecting items in Listbox using (LotusScript)

Hi Sanjeev,

try this:


Dim uiws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim tmpMngDevices as String

Set uidoc = uiws.CurrentDocument

tmpMngDevices = “Your choice…”

Call uidoc.FieldSetText( “dvwithcheckbox”, tmpMngDevices )


Regards,

Tobias

Subject: RE: Selecting items in Listbox using (LotusScript)

Thanks, Tobais

it is selecting only the string what it contains in tmpMngDevices…

apart from that it should check the previous checked items

what if tmpMngDevices is a Names field and it contains already 2 items out of some 4 are checked…??

please suggest

Subject: RE: Selecting items in Listbox using (LotusScript)

Hi

Try below code

eval = uidoc.FieldGetText (“test”)

eval = Replace(eval,“;”,“,”)

eval = eval & “,1,2,3” (append ur choice)

Call uidoc.FieldSetText(“test”, eval)

kavitha

Subject: RE: Selecting items in Listbox using (LotusScript)

Hi,Thanks for ur code.

call uidoc.FieldSetText(“test”,eval) is not giving any output

in eval i am having a list of names seperated by commas.

but this is working only if there is as single string in eval…

Subject: Selecting items in Listbox using (LotusScript)

I use this:

call uidoc.fieldsettext(“listbox”,“a”+chr$(13)+chr$(10)+“b”+chr$(13)+chr$(10)+“c”)

For R5:

call uidoc.fieldsettext(“listbox”,“a,b,c”)