Home » Developer & Programmer » Forms » Performing validation based on unique values in a form (Oracle forms 10g, Application R12)
Performing validation based on unique values in a form [message #579240] Sun, 10 March 2013 00:03 Go to next message
Nshan
Messages: 62
Registered: February 2009
Member
Hi All,

In my form i have a multi record block which is based on a table in which i am performing insertion, deletion, updation.

My requirement is as below,

While saving a records i want to check distinct value of specific item can not be greater than some value say 2.
Then only my records should be saved.

I am planning to populate those values in a collection table type and take the distinct values from it.

Can anyone suggest me on how to populate record values in a collection table type.

Thanks,
Nshan.
Re: Performing validation based on unique values in a form [message #579243 is a reply to message #579240] Sun, 10 March 2013 05:06 Go to previous messageGo to next message
Littlefoot
Messages: 18833
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd suggest another approach.

First POST changes you've made in your form. It will enable you to query the table, such as
select column_name
from your_table
group by column_name
having count(distinct column_name) > 2
If you find such items/columns, raise an error. If not, COMMIT.
Re: Performing validation based on unique values in a form [message #579385 is a reply to message #579243] Tue, 12 March 2013 01:12 Go to previous message
Nshan
Messages: 62
Registered: February 2009
Member
Hi Littlefoot,

Thanks for your suggestion. Let me check and come back.
Previous Topic: how to skip a trigger ?
Next Topic: how can i create line graph on oracle 11g forms
Goto Forum:
  


Current Time: Sun Apr 20 17:51:00 CDT 2014

Total time taken to generate the page: 0.07490 seconds