Populate error message when inserting duplicated field in primary key? [message #391316] |
Wed, 11 March 2009 14:42  |
michaelv
Messages: 20 Registered: November 2006 Location: rockville, MD
|
Junior Member |
|
|
Hi,
I have the problem which i have already searched the forum but no luck. Here is the problem:
Ex: I use very simple form
Form AAA has field A1 which is primary key.
When insert record, the error message will show when saving.
However, i would like to popup the message showing that field entered is duplicated.
I have no problem checking it if data is already in the table, but during the insert.
Table AAA
field A1
a
b
c
field A1
a
b
c
d
d
If i enter d twice (a,b,c are already in the table), it won't check for it until i save
Please help.
thanks.
|
|
|
|
|
|
|
Re: Populate error message when inserting duplicated field in primary key? [message #391558 is a reply to message #391448] |
Thu, 12 March 2009 10:10   |
michaelv
Messages: 20 Registered: November 2006 Location: rockville, MD
|
Junior Member |
|
|
Hi all, sorry for late response.
I first use when-validate-item, but POST won't work on this.
I want to check by the time user enter data. Let say , i have the following in database
AAA
BBB
CCC
If i enter DDD, it's ok. Then, without saving, i enter the next record DDD again. At this point, if i save data, i will get the unique constraint error as it's supposed to be ( can't duplicate primary key).
What i would like is to pop the message to user that second DDD is already in the field.
So, POST won't work on WHEN-VALIDATE-ITEM. However, POST works in WHEN-NEW-RECORD-INSTANCE, but this creats another problem as when you create a new record, POST is posting empty record and this message is irritated to the user.
thanks.
|
|
|
|