How to Create Unique field in ADF JDeveloper
Unique mean
unlike anything else. Unique data is very important in any table, sometime user
does not want same name or same word in the table. If you are working on ADF
JDeveloper, so it is not necessary to use Unique constraint in the column. You
can also give the Unique Constraint through ADF JDeveloper tool.
For Example:
ACTION_NAME VARCHAR2(150) Unique
- ACTION_NAME (Field)
- VARCHAR2 (Datatype)
- Unique (Constraint)
Why we do
this on ADF JDeveloper?
ADF
JDeveloper Tool provides so many facilities to their user. In which one of them
is to generate appropriate Unique Constraint in the DDL for the containing
table. If the user input the same value/word in the specific field, ADF
JDeveloper tool will not allow him and its automatically open a popup message
like “Action Name is Already Exit”.
How to do it :
👉 First
Open your project, Go to your table through EO (Entity Object) → Attributes → ActionName (Select your field) → Double Click
👉 Check on Unique ( If there is already check, Click OK and come out)
👉 Now Right Click → New
Entity Constraint
👉 Now type Unique word (PwcOmDefineActionsEOKeyUnique) → Next
👉 Select your field, ActionName
👉 Select
Alternate → Next → Finish
👉 Click on General Tab → Alternate Keys (Add
it through + Sign or it will Automatically Added)
👉 Business Rules → Entity Validator → Click on + Button
👉 Select Type:
UniqueKey then Select your Field
👉 Select Failure
Handling Table then Type your message → OK
👉 Now Run
Application
No comments:
Thank you for your comment...!