Advertisement

03.21.2006 at 01:06PM PST, ID: 21783098
[x]
Attachment Details

How to load combobox with a field from a Profile Doc?

Asked by SysExpert in Lotus Notes

Tags: combobox

I have a profile DOc that contains a text field allowing multiple entries, which are district codes ( 3 characters each).

I hae a data entry screen , and I want to use a combobox, so the user can choose the district code from the list in the Profile Doc.

I would like to know to do this ?

I have tried the following in the postopen ( creating a copy of the field in the data entry Form )

All items are declared in the Form globally.

Sub Postopen(Source As Notesuidocument)
      ' Prepare list in a field for District Lokkup
      Dim cnt1 As Integer
      Set S= New NotesSession
      Set CurDb = S.CurrentDatabase
      Set prfDoc = CurDb.getProfileDocument("DL_Prof")  
      Set SRdoc=source.Document      
      
      'DLItems is now a hidden field, use it
      
      Set DLitem = prfdoc.GetFirstItem("DL_DC_Field")
      ' DL_DC_Field
      cnt1=1
      ' Dim DistList As String
      Call  SRdoc.CopyItem( DLitem, "DLItems" )
      
'      Forall itemValue In DLitem.Values
'            cnt1=      cnt1+1
''            Messagebox "Values:" & Chr(10) & itemValue
'      End Forall
'      Print cnt1 ' debug
'      DistList=prfdoc.DL_DC_Field(0)
'      Print itemValue ' debug
      
      Call SRdoc.Save(True,False) ' Delete after testing without.
End Sub

I can see the field with the correct data.

In the Combobox I have the list set from the functions to use field DLItems

Opening a doc shows the field correctly

Field Name: DLItems
Data Type: Text List
Data Length: 677 bytes
Seq Num: 1
Dup Item ID: 0
Field Flags: SUMMARY

"001"
"
002"
"
003"

The Combobox is empty- No list to pick from.

Any help resolving this appreciated.
Start Free Trial
 
Loading Advertisement...
 
[+][-]03.21.2006 at 08:04PM PST, ID: 16254131

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Lotus Notes
Tags: combobox
Sign Up Now!
Solution Provided By: marilyng
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.22.2006 at 07:21AM PST, ID: 16258191

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.22.2006 at 08:43AM PST, ID: 16259121

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.22.2006 at 09:33AM PST, ID: 16259667

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.22.2006 at 04:22PM PST, ID: 16263956

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32