Home » Developer & Programmer » Forms » Check for duplicate value in grid for non database block
Check for duplicate value in grid for non database block [message #365212] Thu, 11 December 2008 02:20 Go to next message
pankajhonrao
Messages: 1
Registered: November 2008
Junior Member
Sir
i have non database block. and in that i do not want to accept the duplicate value in id field.If user enter the duplicate value i want to give the message immediately.Is any trigger is available to check the duplicate value
Re: Check for duplicate value in grid for non database block [message #365221 is a reply to message #365212] Thu, 11 December 2008 02:39 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Create a unique or primary key constraint.

Regards
Michel
Re: Check for duplicate value in grid for non database block [message #365223 is a reply to message #365212] Thu, 11 December 2008 02:49 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
The best way I ever found of enforcing this was to create a record group, and add/remove the key value to the group as you create/delete records.
This allows you to check for the key value already existing before you create a new record.
Re: Check for duplicate value in grid for non database block [message #375811 is a reply to message #365223] Mon, 15 December 2008 00:34 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Remember that this solution only works for a single user. You do need to use a primary key when there are multiple users.

David
Previous Topic: List item on my form, that gives me the files of a directory
Next Topic: FRM-41042: Cannot create Group REC - Error
Goto Forum:
  


Current Time: Tue Dec 06 00:16:00 CST 2016

Total time taken to generate the page: 0.07998 seconds