Forum
List Manager Suggestions
Help us to make a better extension !Forums
No se permite escribir sin estar logado. Por favor, login
Re: prevent duplicate records 31.01.2022 10:46
Hi,
thank you very much for your feedback. In fact you have already a method to prevent duplicating key fields. As you're directly editing the database records, you can introduce this restriction at your db table, creating a unique key for one (or more) fields, something like
ALTER TABLE Persons ADD CONSTRAINT MyConstraintPerson UNIQUE (LastName);
With this restriction your database will be in charge of validating data before the insert/update operation. With latest LM version 4.1.10 we have forwarded this validation error to the page, so if you try to insert a non-valid value using List Manager you will get a message like this:
Duplicate entry 'Jordan' for key 'MyConstraintPerson'
Hope this helps,regards
Moonsoft Team
www.moonsoft.es
thank you very much for your feedback. In fact you have already a method to prevent duplicating key fields. As you're directly editing the database records, you can introduce this restriction at your db table, creating a unique key for one (or more) fields, something like
ALTER TABLE Persons ADD CONSTRAINT MyConstraintPerson UNIQUE (LastName);
With this restriction your database will be in charge of validating data before the insert/update operation. With latest LM version 4.1.10 we have forwarded this validation error to the page, so if you try to insert a non-valid value using List Manager you will get a message like this:
Duplicate entry 'Jordan' for key 'MyConstraintPerson'
Hope this helps,regards
Moonsoft Team
www.moonsoft.es