Home » Developer & Programmer » Forms » How to check for duplicate values in form. (6i)
How to check for duplicate values in form. [message #309345] Thu, 27 March 2008 03:08 Go to next message
harshalonline22
Messages: 74
Registered: March 2007
Location: Pune
Member
You have a multi record block in form.For example,

You have 2 columns & 10 rows displayed in you form.
Consider only first column.
Now you enter any value (Say 10) into 1 row text field which is of number data type.

If you enter value 10 in same column then immediately error should be diplayed.


SR NO. -------- NAME
10 -------- abc
20 -------- xyz
40 -------- pqr
10 -------- bcd

Now 10 is duplicating in 1st column.

So what is the solution to catch the duplicate value entered in a multi record block?? Is there any such option provided by forms to handle such situation?


Thanks & Regards,
Harshal

[Updated on: Thu, 27 March 2008 03:11]

Report message to a moderator

Re: How to check for duplicate values in form. [message #309351 is a reply to message #309345] Thu, 27 March 2008 03:20 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Search the board; it has been asked (and answered) many times, some of them recently.
Re: How to check for duplicate values in form. [message #309363 is a reply to message #309345] Thu, 27 March 2008 03:57 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Yes there are different solutions for it but one has write code for it.

If there is no issue on navigation then on new record instance you can perform this check by doing following

1- On Post Text item store the record no. and block name, item name and valuer of the item to check.

2- Place a WHEN-NEW-RD instance at form level. Here check that if the block name is your block name then go to first record of the block.

3- Check each record weather the valuer is equal or not if equal then raise alert.

Note: This involve navigation. Which might not be sutiable in some cases.

Another solution is that you create a PL-SQL TABLE in forms and after all type of validation if you are perform store each record in it. And when you try to leave a record ON POST TEXT ITEM you can check that value in array.

I would recommond the Array solution which requires no navigation.

Regards,
Azam Khan
Re: How to check for duplicate values in form. [message #309552 is a reply to message #309363] Thu, 27 March 2008 18:01 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
1. This should be done in When-Validate-Item as Post-Text will happen EVERY time you pass through the item.

This has been answered better previously, just search for it.

David
Previous Topic: how to put background image in form
Next Topic: hoew to control one item from another one
Goto Forum:
  


Current Time: Fri Dec 02 12:02:38 CST 2016

Total time taken to generate the page: 0.09232 seconds