I need to validate a VIN field on a form (when/before saving) to ensure that user’s VIN is listed in the view which has 5 millions records. I tried with @DbColumn and @DbLookup but they have limitation.
Any advice or suggestion is appreciated.
Sue
I need to validate a VIN field on a form (when/before saving) to ensure that user’s VIN is listed in the view which has 5 millions records. I tried with @DbColumn and @DbLookup but they have limitation.
Any advice or suggestion is appreciated.
Sue
Subject: Field Validation with 5 millions records?
@DBColumn won’t work because it returns more than 64K.
@DBLookup should work but make sue you’re using the right view / lookup key combination so that you’re only returning one record if there’s a match, and hence < 64K.
Subject: RE: Field Validation with 5 millions records?
Hi Simon, I try with @DbLookup again but what do you mean by ‘using the right view/lookup key’?
Thanks,
Sue
Subject: Field Validation with 5 millions records?
Hi
Create view with first column has VIN
and use the @dblookup method
Subject: Field Validation with 5 millions records?
Hi Sue,interesting problem! Is it a Notes client application or a Domino browser based one?
In the first case:
Validate in the QuerySave event, use LS2J to call a custom Java class. The Java class calls your server with ?ReadviewEntires&Count=1&Startkey=yourvinentered.
Then check if you get results.
In a Domino app do the same using JavaScript and the XMLHttpObject (Ajax).
Just out of curiosity: @DBColumn won’t work since the returnset is too big. @DBlookup should return just your one VIN (or an error). If your view contains duplicate VIN (many of them) you need to rethink the views structure (categorize it by VIN, that will eliminate duplicates).
Hth
stw
Subject: RE: Field Validation with 5 millions records?
Stephan, Thank you for the help. This is for Notes client. I just need this to check that the user VIN is in listed in the view, not extracting any valule if the user’s VIN is found. I am new to Notes so I am playing with the formula. Do you have sample LS2J or script will do better for the performance?
Regards,
Sue ![]()