Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > validate fields against duplicates View modes: 
User avatar
Member
Member
lwhittemore-emh - 1/17/2014 7:20:32 AM
   
validate fields against duplicates
I had a client ask if there was a way for them to have a form with one of the fields be for a serial number that would check the number against forms that have already been enter to make sure the serial number is unique.

It's for users to register products they own and they want to prevent people from registering the same product twice.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/17/2014 8:51:51 AM
   
RE:validate fields against duplicates
Out of the box, no. You can create a global object handler pretty easily though which would check every time that form has a submission.

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 1/17/2014 12:18:19 PM
   
RE:validate fields against duplicates
You could clone the form webpart and then insert an onBeforeSaveEvent which would get a list of all the serial numbers(whereever they are stored) and loop through and compare your
form.BasicForm.GetFieldValue("MyField")
to the serial number field in your product table.