Hi ppl, I have been using and developing in notes for a few years now, but I have only recently started to learn how to use the ‘script libraries’, but I am stuck.
I have a form [Profile] which has some info regarding a person and their holiday entitlements. Now, I wish to retrieve their remaining holiday via a Lotus Script from a different form [Request Holiday].
So far I have created a Function :-
Public Function DaysUsed (sProfileName As String) As String
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = s.CurrentDatabase
DaysUsed = doc.GetItemValue("ProfileVacationUsed")
End Function
But my big problem is, how can I tell the function to look at a certain document and return the info required
I;m not quite sure what you are trying to achieve.
If you are passing the profilename already, then you can use that to get a handle on the profile document (don;t confuse forms with documents - forms are design elements - documents have the data on them)
I have 2 Forms [Profiles & RequestHoliday]. I have created 1 Document in the Profiles Form, Fieldname ‘ProfileName’ and Document Data Stored JoeBloggs.
Now when I click on the RequestHoliday Form and select JoeBloggs from my list, I wish to call the LotusScript to lookup that Document and retreive the Info from the UsedHoliday Field