813: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_TABLE';
814:
815: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
816:
817: SELECT pon_form_section_compiled.FORM_ID,
818: pon_form_section_compiled.TYPE,
819: pon_form_section_compiled.FIELD_CODE,
820: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
821: pon_form_section_compiled.REQUIRED,
814:
815: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
816:
817: SELECT pon_form_section_compiled.FORM_ID,
818: pon_form_section_compiled.TYPE,
819: pon_form_section_compiled.FIELD_CODE,
820: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
821: pon_form_section_compiled.REQUIRED,
822: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
815: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
816:
817: SELECT pon_form_section_compiled.FORM_ID,
818: pon_form_section_compiled.TYPE,
819: pon_form_section_compiled.FIELD_CODE,
820: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
821: pon_form_section_compiled.REQUIRED,
822: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
823: pon_forms_sections.FORM_CODE SECTION_CODE,
816:
817: SELECT pon_form_section_compiled.FORM_ID,
818: pon_form_section_compiled.TYPE,
819: pon_form_section_compiled.FIELD_CODE,
820: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
821: pon_form_section_compiled.REQUIRED,
822: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
823: pon_forms_sections.FORM_CODE SECTION_CODE,
824: pon_fields.DATATYPE ,
817: SELECT pon_form_section_compiled.FORM_ID,
818: pon_form_section_compiled.TYPE,
819: pon_form_section_compiled.FIELD_CODE,
820: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
821: pon_form_section_compiled.REQUIRED,
822: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
823: pon_forms_sections.FORM_CODE SECTION_CODE,
824: pon_fields.DATATYPE ,
825: pon_fields.VALUE_SET_NAME,
818: pon_form_section_compiled.TYPE,
819: pon_form_section_compiled.FIELD_CODE,
820: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
821: pon_form_section_compiled.REQUIRED,
822: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
823: pon_forms_sections.FORM_CODE SECTION_CODE,
824: pon_fields.DATATYPE ,
825: pon_fields.VALUE_SET_NAME,
826: pon_fields.SYSTEM_FLAG,
825: pon_fields.VALUE_SET_NAME,
826: pon_fields.SYSTEM_FLAG,
827: pon_fields_tl.FIELD_NAME,
828: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
829: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
830: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
831: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
832: FROM PON_FORM_SECTION_COMPILED,
833: PON_FIELDS,
826: pon_fields.SYSTEM_FLAG,
827: pon_fields_tl.FIELD_NAME,
828: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
829: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
830: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
831: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
832: FROM PON_FORM_SECTION_COMPILED,
833: PON_FIELDS,
834: PON_FIELDS_TL,
827: pon_fields_tl.FIELD_NAME,
828: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
829: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
830: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
831: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
832: FROM PON_FORM_SECTION_COMPILED,
833: PON_FIELDS,
834: PON_FIELDS_TL,
835: PON_FORMS_SECTIONS
828: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
829: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
830: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
831: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
832: FROM PON_FORM_SECTION_COMPILED,
833: PON_FIELDS,
834: PON_FIELDS_TL,
835: PON_FORMS_SECTIONS
836: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
832: FROM PON_FORM_SECTION_COMPILED,
833: PON_FIELDS,
834: PON_FIELDS_TL,
835: PON_FORMS_SECTIONS
836: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
837: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
838: AND pon_forms_sections.FORM_ID = P_FORM_ID
839: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
840: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
833: PON_FIELDS,
834: PON_FIELDS_TL,
835: PON_FORMS_SECTIONS
836: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
837: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
838: AND pon_forms_sections.FORM_ID = P_FORM_ID
839: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
840: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
841: AND pon_fields_tl.LANGUAGE(+) = g_base_language
835: PON_FORMS_SECTIONS
836: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
837: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
838: AND pon_forms_sections.FORM_ID = P_FORM_ID
839: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
840: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
841: AND pon_fields_tl.LANGUAGE(+) = g_base_language
842: ORDER BY
843: INTERNAL_SEQUENCE_NUMBER;
836: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
837: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
838: AND pon_forms_sections.FORM_ID = P_FORM_ID
839: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
840: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
841: AND pon_fields_tl.LANGUAGE(+) = g_base_language
842: ORDER BY
843: INTERNAL_SEQUENCE_NUMBER;
844:
857: v_jrad_field_id VARCHAR2(200);
858: v_jrad_element_id VARCHAR2(200);
859: v_LEVEL1_SECTION_ID NUMBER;
860: v_incl_section_id NUMBER;
861: v_parent_row_type PON_FORM_SECTION_COMPILED.TYPE%TYPE;
862: v_vset_element_created VARCHAR2(1);
863:
864: BEGIN
865:
880: */
881:
882: select LEVEL1_SECTION_ID , LEVEL2_SECTION_ID, type
883: into v_LEVEL1_SECTION_ID, v_incl_section_id, v_parent_row_type
884: from pon_form_section_compiled
885: where form_id = p_form_id
886: and repeating_section_id = section_id
887: and internal_sequence_number = p_row_seq_num;
888:
1459:
1460: CURSOR V_ABSTRACT_FIELDS_CURSOR IS
1461:
1462: select pon_fields.field_code,
1463: pon_form_section_compiled.mapping_field_value_column,
1464: pon_fields.datatype,
1465: pon_fields.value_set_name,
1466: pon_fields.system_flag,
1467: pon_fields.system_field_lov_flag,
1470: pon_forms_sections.form_id,
1471: pon_forms_sections.form_code,
1472: pon_forms_sections_tl.form_name,
1473: pon_forms_sections_tl.form_description,
1474: pon_form_section_compiled.display_on_main_page,
1475: pon_form_section_compiled.internal_sequence_number
1476: from pon_fields,
1477: pon_fields_tl,
1478: pon_forms_sections,
1471: pon_forms_sections.form_code,
1472: pon_forms_sections_tl.form_name,
1473: pon_forms_sections_tl.form_description,
1474: pon_form_section_compiled.display_on_main_page,
1475: pon_form_section_compiled.internal_sequence_number
1476: from pon_fields,
1477: pon_fields_tl,
1478: pon_forms_sections,
1479: pon_forms_sections_tl,
1476: from pon_fields,
1477: pon_fields_tl,
1478: pon_forms_sections,
1479: pon_forms_sections_tl,
1480: pon_form_section_compiled
1481: where
1482: pon_forms_sections.FORM_CODE = 'ABSTRACT'
1483: and pon_forms_sections.STATUS = 'ACTIVE'
1484: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1480: pon_form_section_compiled
1481: where
1482: pon_forms_sections.FORM_CODE = 'ABSTRACT'
1483: and pon_forms_sections.STATUS = 'ACTIVE'
1484: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1485: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1486: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1487: and pon_form_section_compiled.FIELD_CODE is not null
1488: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1482: pon_forms_sections.FORM_CODE = 'ABSTRACT'
1483: and pon_forms_sections.STATUS = 'ACTIVE'
1484: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1485: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1486: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1487: and pon_form_section_compiled.FIELD_CODE is not null
1488: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1489: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1490: and pon_fields_tl.LANGUAGE = g_base_language
1483: and pon_forms_sections.STATUS = 'ACTIVE'
1484: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1485: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1486: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1487: and pon_form_section_compiled.FIELD_CODE is not null
1488: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1489: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1490: and pon_fields_tl.LANGUAGE = g_base_language
1491: and pon_forms_sections_tl.LANGUAGE = g_base_language
1484: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1485: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1486: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1487: and pon_form_section_compiled.FIELD_CODE is not null
1488: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1489: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1490: and pon_fields_tl.LANGUAGE = g_base_language
1491: and pon_forms_sections_tl.LANGUAGE = g_base_language
1492: and nvl(pon_form_section_compiled.display_on_main_page, 'N') = 'Y'
1488: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1489: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1490: and pon_fields_tl.LANGUAGE = g_base_language
1491: and pon_forms_sections_tl.LANGUAGE = g_base_language
1492: and nvl(pon_form_section_compiled.display_on_main_page, 'N') = 'Y'
1493: order by
1494: internal_sequence_number;
1495:
1496: mainDoc JDR_DOCBUILDER.DOCUMENT;
1665: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_FORM';
1666:
1667: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
1668:
1669: SELECT pon_form_section_compiled.FORM_ID,
1670: pon_form_section_compiled.TYPE,
1671: pon_form_section_compiled.FIELD_CODE,
1672: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1673: pon_form_section_compiled.REQUIRED,
1666:
1667: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
1668:
1669: SELECT pon_form_section_compiled.FORM_ID,
1670: pon_form_section_compiled.TYPE,
1671: pon_form_section_compiled.FIELD_CODE,
1672: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1673: pon_form_section_compiled.REQUIRED,
1674: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1667: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
1668:
1669: SELECT pon_form_section_compiled.FORM_ID,
1670: pon_form_section_compiled.TYPE,
1671: pon_form_section_compiled.FIELD_CODE,
1672: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1673: pon_form_section_compiled.REQUIRED,
1674: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1675: pon_forms_sections.FORM_CODE SECTION_CODE,
1668:
1669: SELECT pon_form_section_compiled.FORM_ID,
1670: pon_form_section_compiled.TYPE,
1671: pon_form_section_compiled.FIELD_CODE,
1672: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1673: pon_form_section_compiled.REQUIRED,
1674: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1675: pon_forms_sections.FORM_CODE SECTION_CODE,
1676: pon_fields.DATATYPE,
1669: SELECT pon_form_section_compiled.FORM_ID,
1670: pon_form_section_compiled.TYPE,
1671: pon_form_section_compiled.FIELD_CODE,
1672: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1673: pon_form_section_compiled.REQUIRED,
1674: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1675: pon_forms_sections.FORM_CODE SECTION_CODE,
1676: pon_fields.DATATYPE,
1677: pon_fields.SYSTEM_FLAG,
1670: pon_form_section_compiled.TYPE,
1671: pon_form_section_compiled.FIELD_CODE,
1672: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1673: pon_form_section_compiled.REQUIRED,
1674: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1675: pon_forms_sections.FORM_CODE SECTION_CODE,
1676: pon_fields.DATATYPE,
1677: pon_fields.SYSTEM_FLAG,
1678: pon_fields.VALUE_SET_NAME,
1677: pon_fields.SYSTEM_FLAG,
1678: pon_fields.VALUE_SET_NAME,
1679: pon_fields_tl.FIELD_NAME,
1680: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1681: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1682: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1683: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID,
1684: pon_form_section_compiled.EDITABLE
1685: FROM PON_FORM_SECTION_COMPILED,
1678: pon_fields.VALUE_SET_NAME,
1679: pon_fields_tl.FIELD_NAME,
1680: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1681: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1682: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1683: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID,
1684: pon_form_section_compiled.EDITABLE
1685: FROM PON_FORM_SECTION_COMPILED,
1686: PON_FIELDS,
1679: pon_fields_tl.FIELD_NAME,
1680: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1681: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1682: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1683: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID,
1684: pon_form_section_compiled.EDITABLE
1685: FROM PON_FORM_SECTION_COMPILED,
1686: PON_FIELDS,
1687: PON_FIELDS_TL,
1680: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1681: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1682: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1683: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID,
1684: pon_form_section_compiled.EDITABLE
1685: FROM PON_FORM_SECTION_COMPILED,
1686: PON_FIELDS,
1687: PON_FIELDS_TL,
1688: PON_FORMS_SECTIONS
1681: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1682: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1683: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID,
1684: pon_form_section_compiled.EDITABLE
1685: FROM PON_FORM_SECTION_COMPILED,
1686: PON_FIELDS,
1687: PON_FIELDS_TL,
1688: PON_FORMS_SECTIONS
1689: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1685: FROM PON_FORM_SECTION_COMPILED,
1686: PON_FIELDS,
1687: PON_FIELDS_TL,
1688: PON_FORMS_SECTIONS
1689: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1690: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1691: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1692: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1693: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1686: PON_FIELDS,
1687: PON_FIELDS_TL,
1688: PON_FORMS_SECTIONS
1689: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1690: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1691: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1692: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1693: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1694: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1687: PON_FIELDS_TL,
1688: PON_FORMS_SECTIONS
1689: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1690: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1691: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1692: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1693: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1694: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1695: ORDER BY
1688: PON_FORMS_SECTIONS
1689: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1690: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1691: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1692: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1693: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1694: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1695: ORDER BY
1696: INTERNAL_SEQUENCE_NUMBER;
1689: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1690: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1691: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1692: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1693: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1694: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1695: ORDER BY
1696: INTERNAL_SEQUENCE_NUMBER;
1697:
1756: v_curr_formfieldvaluesvo_name VARCHAR2(100);
1757: v_top_formfieldvaluesvo_name VARCHAR2(100);
1758: v_display_type VARCHAR2(1);
1759: v_validation_type VARCHAR2(1);
1760: v_prev_record_type PON_FORM_SECTION_COMPILED.TYPE%TYPE;
1761:
1762: rval INTEGER;
1763: dataEntryRegion JDR_DOCBUILDER.DOCUMENT := NULL;
1764: readOnlyRegion JDR_DOCBUILDER.DOCUMENT := NULL;