Validate field using Query Result

Validate field using Query Result

Sometimes we need to validate field from list of values return from SQL query. ADF framework offers to built-in functionality for that.

Here I’m using Hr Schema’s Employees table.

 

  1. Select JobId Attribute in Employees entity and go to validation tab.
  2. Then click on “Green Plus” icon to add new validation rule on attribute.
  3. On Dialog window select
  • Type=Compare
  • Operator=Equals
  • Compare With=Query Result

  1. Write query to get all job id from jobs table.

SELECT JOB_ID FROM JOBS

  1. On Failure Handling tab set Error message.

Ouput:-

About Manish Pandey

Manish is a Project Leader at Jagran Prakashan Ltd, focused on Jdeveloper Fusion Web Application(specifically Oracle ADF). He shares his knowledge through the OTN Jdev/ADF Forum. He has written more than 50 article about Oracle ADF and Jdeveloper.

Leave a Reply