Search code examples
lotus-noteslotus-dominodomino-designer-eclipse

How to get view data to copy to field in document?


I'm currently tasked to redesign an application form where several fields will need to auto-fill based on the data from a specific field when it is entered.

Since I'm relatively new to LotusNotes, my boss hinted at me to first create a view which displays the fields to auto-fill. Which I did:

| Visitor Name | Company Name | Contact No | Date Entered |

Visitor Name is the field which will determine the data for Company Name and Contact No when it auto-fills in the form. Date Entered will see which data is the most recent and will use that. Also the field must be set as Editable to allow user to change the data if need be.

However, when trying to modify the form, I can't quite get how to link the view together with my desired field in the form.

I tried @DbLookup and created the formula

@If(VisitorName = "";"";VisitorName != ""; @DbLookup("" : "" ; "Local":"D:\LotusNotes Project\HR002a.nsf"; "Visitor View";@text(ContactName);@Text(CompanyName));"")

But it doesn't seem to work when I place it in Default Value or Input Translation. Even changing the filed to Computed doesn't seem to help as well.

What else am I missing in my formula?


Solution

  • You could simplyfiy your formula

    @If(VisitorName != ""; @DbLookup("";@dbname;"Visitor View";@text(ContactName);2;[FailSilent]);"")