Hi everybody,
I have a entry form where the user should enter Vendor Details. A view is associated with that particular form as well.
But I have to restrict the user from entering a duplicate value in the Vendor Code field. The form will be opened in Internet Explorer(not Lotus Notes Client). I am using Lotus Domino 5.
How can I do that? Can anybody help me? Please, it’s very urgent.
Thanks in anticipation. Looking forward.
Abhishek SenGupta.
Subject: Checking duplicate field entry in web.
You should use javascript.
Type validation javascript in the “JS Header” of your form (you can find it where it lists all the object, at the bottom-middle of your screen). Search the internet for “javascript validation” - there are plenty of examples, then refer to your form field in the javascript by its name and do the validation in the “JS Header”. Yes, and make sure that “Run” dropdown at the “JS Header” is set to Web, rather than Client
Subject: Checking duplicate field entry in web.
Thank you for your suggestion, but I know that JavaScript is required here.
But what will be the code to check the duplicate entries checking with a view. in web?
Can any one else help me out to resolve this issue?
Thanks.
Abhishek SenGupta.
Subject: RE: Checking duplicate field entry in web.
Have a piece of Javascript declaring an array:
vat vendorList=new Array(xxx);
In place of where I have put xxx create a Notes computed field, multi-value with comma as the seperator. The formula for the field should be a @DBColumn lookup to the vendor list with quotes around it. Something like:
“"” + @DBColumn(“”:“”;“”;Vendor_View;1) + “"”
When you open the form and look at the source you should have something like:
var vendorList=new Array(“Vendor_1”, “Vendor_2”, Vendor_3");
Now all you need to do is add some JS code in your validation routines to see if the value entered in the field is already a member of the array.
Hope this helps
Pete