Hi all,
I am involved in a task where I have to decide if to use the Notes Client as a replacement for Lotus Approch. There are some applications that use Approach as a front end to the user and an SQL Database. Most of the scripts could be used in Notes (especially the sql interface and the internal logic), but the front end is quite different.
Actually I am looking for a solution to the following problem:
The script creates an array with customer names, adresses and a pointer to the customer record in the database (1 line per customer). This array should then be presented in a dialog box where the user then selects a line with double click for further processing.
In Approach this is a quite simple task: just filling a listbox, the selection is shown as an index to the array.
I was searching and trying now for days in Notes and got a bit confused. I have learned that a listbox filed basically does what I want, but so far I was not successful with that task.
I would be very grateful if some kind soul could post a working example.
Thank you
Paul
Subject: Dialog List - Prompt
@ Bob:
Thank you very much. This is exactly what I was looking for.
Additional question: Is there a change to use a fixed size font for the box?
BTW: This is the first really valuable hint! I was searching for a solution for more than 2 weeks, the combination with a hidden field as source and a listbox field did not work.
Thanks
Paul
Subject: Listbox - refresh
Although NotesUIWorkspace Prompt basically does what I want, I am still trying to find a solution with a listbox field.
This is the status now:
Within the form named “Kundenauswahl” I have defined 2 fields:
-
“Auswahl”: hidden multivalue text field
-
“Kundenliste”: listbox field, computed from “Auswahl”, both refresh-checks on
This is the script that shows that form:
Dim newdoc As NotesUIDocument
Set newdoc = ws.ComposeDocument ( , , “Kundenauswahl” )
Call newdoc.Document.ReplaceItemValue( “Auswahl” ,Kdn_Tab)
Call newdoc.Document.ReplaceItemValue( “Kundenliste” ,“”)
Call newdoc.refresh
On the display the field “Kundenliste” is empty, although the data is there. I can see that when I use the debugger. By newdoc.refresh it gets refreshed in core but not on the display.
Has someone encoutered this situation?
Paul
Subject: Lotus Application Development - ListBox
Working with a blank Lotus database is easy.
You may want to open a PMR with our Application Development team for complex questions.
You can create a ListBox using LotusScript.
Use the Lotus Designer client to create database design elements.
Here are some free training documents :
Title: LotusScript Self-Help Training Module 1 - ‘Using LotusScript within a custom application’
Doc #: 7010056
URL: http://www.ibm.com/support/docview.wss?uid=swg27010056 http://www.ibm.com/support/docview.wss?uid=swg27010056
Title: LotusScript Self-Help Training Module 2: ‘How to write a simple back-end LotusScript agent’
Doc #: 7010431
URL: http://www.ibm.com/support/docview.wss?uid=swg27010431 http://www.ibm.com/support/docview.wss?uid=swg27010431
Subject: You might want to use
reload, not refresh
c.f.
This method is valid only when the document is in Edit mode.
This method reloads the back-end document associtated with the editing session, which can be acquired through the Document property <>. It does not reload the base back-end document saved on disk. You must close and reopen the document to reload the base back-end document.
This method is useful only when the AutoReload property <> is False. By default this property is True and modifications to the back-end document appear immediately in the front-end. Where reloading on every modification is slow, you might set the AutoReload property <> to False, make the modifications, and call Reload.
Rich text items are an exception. Modifications made to rich-text items in the back-end document do not appear in the front-end until the document is closed and reopened.
Modifications made to the back-end document outside the current editing session (for example, by an agent or another user) do not appear until the document is closed and reopened.
You can close and reopen a front-end document with NotesUIDocument.Close(True) <> and NotesUIWorkspace.EditDocument <>.
Subject: If your talking about lotusscript …
Take a look at the NotesUIWorkspace Prompt method in Designer Help
IBM Developer http://www.ibm.com/developerworks/lotus/documentation/dominodesigner/
Subject: Listbox - solved
OK, I found the solution:
I wrongly defined the listbox as computed instead of editable. Now it works. The only difference to the listbox in Approach is the fact that OnClick and DblClick are not triggered for Lotusscript on the client.
Tank you all!
Paul
Subject: Listbox - fire onchange Code
@Bob: can’t follow the link
Paul
Subject: here is the text from the link
I think what you are looking for is 2 things:
-
the onChange event for the first checkbox (listbox)Field
-
the ‘Run Exiting/OnChange events after value change’ property of a checkbox (listbox) field (found on the 3rd tab counting left to right of the Field infobox)
By selecting the Field property mentioned in 2. above, it will immediately trigger any onChange code as soon as you click (change) the checkbox (listbox)
Subject: Listbox - display vs core
@ Christoper
Thank you for your suggestion. I tried several ways: creating a background document, load in the foreground; saving, reloading the uidocument. It always comes down to the same result: the field is created in core, but empty on display. I think it has something to do with the definition of the listbox. I also tried several combinations - always the same.