Reputation: 570
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?
Upvotes: 0
Views: 372
Reputation: 1068
You could simplyfiy your formula
@If(VisitorName != ""; @DbLookup("";@dbname;"Visitor View";@text(ContactName);2;[FailSilent]);"")
Upvotes: 2
Reputation: 2795
I am assuming this is a form used in the Notes clieny, not on the web. If this is a web form, you need a different approach.
You could very well use @DBLookup for that task. To improve performance, concatenate all the values into one column, perform the @DbLookup on the form, retrieving the concatenated values, then split them into separate values and populate the different fields.
You could also use Lotusscript. You want to look at the NotesView class and the NotesViewEntry class (assuming you want to build it for performance). Use the ColumnValues property of the NotesViewEntry class to read the columns in the view. Remember that the first column needs to be sorted.
Or your company could hire someone that already know Notes and Domino, and have that done in an hour. That would probably be financially a better choice than you spending hours or days on this fairly simple task. There are many of us here (me included) who could jump in and fix this for your company.
Upvotes: 0