/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2016 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

CREATE OR REPLACE VIEW xxas_form_fields_v
AS 
SELECT fields.lookup_code field_type_id
      ,fields.meaning field_type_value
      ,field_attributes.lookup_code field_attribute_id
      ,field_attributes.meaning field_attribute_value
FROM hr_lookups fields, hr_lookups field_attributes
WHERE fields.lookup_type = 'XXAS_FIELDS'
AND   field_attributes.lookup_type = 'XXAS_FIELD_ATTRIBUTES'
AND   field_attributes.description like '%'||fields.LOOKUP_CODE||'%';
  
BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_FORM_FIELDS_V'
   ,p_description            => 'Applaud Form Fields View');
END;
/
COMMIT;
EXIT;
