Lookups into names.nsf

Hi all,

I’m a rookie developer and need some guidance. I am trying to put together a simple Notes Client application that can track equipment issued to employees. Items like laptops, cell phones, etc.

My vision is a form that will populate fields from the Public Address Book names.nsf after I select the employee from a names field and then click a Look Up Button.

The lower half of the form would be a table where I would select from known assets and then add serial numbers, dates issued, etc. The end goal would be a nice one page report of the employee and their issued equipment.

Can someone guide me in the construct of looking up the employee and having the person doc fields returned to my form?

I am aware of @DbLookup, but can’t figure out how to implement it via the look up button I created.

Am I correct in using a NAmes field to get the employee name and then using a look up button to populate the form? Or is there some easier way of approaching this?

Is anyone aware of perhaps a sandbox app that is already out there for me to tweak?

Thank you kindly…

Doug

Subject: Asset management - doc/response design

Use a parent/child design.

The parent is a document that contains general demographic information about the user.

The response (child) docs are the assets; one response doc per asset. In this way you can embed a single category view that lists all the assets for one user (or just see it in the view). You can better sort and group data if each asset is its own doc. If you try and go with an actual table, when someone asks ‘where are all the dell 9866 computers’, you’re screwed. If they are separate docs, just create a view that lists asset by and you now have an easy way to find all of the <whatever you’ve been asked to find>

Subject: I’d use LotusScript for that

This is just off the top of my head, but something like this:

Get the $Users view for names.nsf (GetView http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_GETVIEW_METHOD.html)
Get the document for the user you are looking for (GetAllDocumentsByKey http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_GETALLDOCUMENTSBYKEY_METHOD.html)
Get the items from the document that you need (GetItemValue http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_GETITEMVALUE_METHOD.html)

Subject: Sandbox

OpenNTF.org

No clue if anything is there for your needs but that’s the go to spot for Notes code.