683: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_TABLE';
684:
685: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
686:
687: SELECT pon_form_section_compiled.FORM_ID,
688: pon_form_section_compiled.TYPE,
689: pon_form_section_compiled.FIELD_CODE,
690: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
691: pon_form_section_compiled.REQUIRED,
684:
685: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
686:
687: SELECT pon_form_section_compiled.FORM_ID,
688: pon_form_section_compiled.TYPE,
689: pon_form_section_compiled.FIELD_CODE,
690: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
691: pon_form_section_compiled.REQUIRED,
692: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
685: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
686:
687: SELECT pon_form_section_compiled.FORM_ID,
688: pon_form_section_compiled.TYPE,
689: pon_form_section_compiled.FIELD_CODE,
690: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
691: pon_form_section_compiled.REQUIRED,
692: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
693: pon_forms_sections.FORM_CODE SECTION_CODE,
686:
687: SELECT pon_form_section_compiled.FORM_ID,
688: pon_form_section_compiled.TYPE,
689: pon_form_section_compiled.FIELD_CODE,
690: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
691: pon_form_section_compiled.REQUIRED,
692: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
693: pon_forms_sections.FORM_CODE SECTION_CODE,
694: pon_fields.DATATYPE ,
687: SELECT pon_form_section_compiled.FORM_ID,
688: pon_form_section_compiled.TYPE,
689: pon_form_section_compiled.FIELD_CODE,
690: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
691: pon_form_section_compiled.REQUIRED,
692: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
693: pon_forms_sections.FORM_CODE SECTION_CODE,
694: pon_fields.DATATYPE ,
695: pon_fields.VALUE_SET_NAME,
688: pon_form_section_compiled.TYPE,
689: pon_form_section_compiled.FIELD_CODE,
690: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
691: pon_form_section_compiled.REQUIRED,
692: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) LEVEL1_SECTION_ID,
693: pon_forms_sections.FORM_CODE SECTION_CODE,
694: pon_fields.DATATYPE ,
695: pon_fields.VALUE_SET_NAME,
696: pon_fields.SYSTEM_FLAG,
695: pon_fields.VALUE_SET_NAME,
696: pon_fields.SYSTEM_FLAG,
697: pon_fields_tl.FIELD_NAME,
698: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
699: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
700: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
701: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
702: FROM PON_FORM_SECTION_COMPILED,
703: PON_FIELDS,
696: pon_fields.SYSTEM_FLAG,
697: pon_fields_tl.FIELD_NAME,
698: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
699: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
700: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
701: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
702: FROM PON_FORM_SECTION_COMPILED,
703: PON_FIELDS,
704: PON_FIELDS_TL,
697: pon_fields_tl.FIELD_NAME,
698: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
699: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
700: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
701: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
702: FROM PON_FORM_SECTION_COMPILED,
703: PON_FIELDS,
704: PON_FIELDS_TL,
705: PON_FORMS_SECTIONS
698: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
699: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
700: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
701: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) SECTION_ID
702: FROM PON_FORM_SECTION_COMPILED,
703: PON_FIELDS,
704: PON_FIELDS_TL,
705: PON_FORMS_SECTIONS
706: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
702: FROM PON_FORM_SECTION_COMPILED,
703: PON_FIELDS,
704: PON_FIELDS_TL,
705: PON_FORMS_SECTIONS
706: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
707: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
708: AND pon_forms_sections.FORM_ID = P_FORM_ID
709: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
710: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
703: PON_FIELDS,
704: PON_FIELDS_TL,
705: PON_FORMS_SECTIONS
706: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
707: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
708: AND pon_forms_sections.FORM_ID = P_FORM_ID
709: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
710: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
711: AND pon_fields_tl.LANGUAGE(+) = g_base_language
705: PON_FORMS_SECTIONS
706: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
707: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
708: AND pon_forms_sections.FORM_ID = P_FORM_ID
709: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
710: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
711: AND pon_fields_tl.LANGUAGE(+) = g_base_language
712: ORDER BY
713: INTERNAL_SEQUENCE_NUMBER;
706: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
707: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
708: AND pon_forms_sections.FORM_ID = P_FORM_ID
709: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
710: AND pon_form_section_compiled.TYPE IN ('FORM_FIELD', 'REPEAT_SECTION')
711: AND pon_fields_tl.LANGUAGE(+) = g_base_language
712: ORDER BY
713: INTERNAL_SEQUENCE_NUMBER;
714:
727: v_jrad_field_id VARCHAR2(200);
728: v_jrad_element_id VARCHAR2(200);
729: v_LEVEL1_SECTION_ID NUMBER;
730: v_incl_section_id NUMBER;
731: v_parent_row_type PON_FORM_SECTION_COMPILED.TYPE%TYPE;
732: v_vset_element_created VARCHAR2(1);
733:
734: BEGIN
735:
750: */
751:
752: select LEVEL1_SECTION_ID , LEVEL2_SECTION_ID, type
753: into v_LEVEL1_SECTION_ID, v_incl_section_id, v_parent_row_type
754: from pon_form_section_compiled
755: where form_id = p_form_id
756: and repeating_section_id = section_id
757: and internal_sequence_number = p_row_seq_num;
758:
1329:
1330: CURSOR V_ABSTRACT_FIELDS_CURSOR IS
1331:
1332: select pon_fields.field_code,
1333: pon_form_section_compiled.mapping_field_value_column,
1334: pon_fields.datatype,
1335: pon_fields.value_set_name,
1336: pon_fields.system_flag,
1337: pon_fields.system_field_lov_flag,
1340: pon_forms_sections.form_id,
1341: pon_forms_sections.form_code,
1342: pon_forms_sections_tl.form_name,
1343: pon_forms_sections_tl.form_description,
1344: pon_form_section_compiled.display_on_main_page,
1345: pon_form_section_compiled.internal_sequence_number
1346: from pon_fields,
1347: pon_fields_tl,
1348: pon_forms_sections,
1341: pon_forms_sections.form_code,
1342: pon_forms_sections_tl.form_name,
1343: pon_forms_sections_tl.form_description,
1344: pon_form_section_compiled.display_on_main_page,
1345: pon_form_section_compiled.internal_sequence_number
1346: from pon_fields,
1347: pon_fields_tl,
1348: pon_forms_sections,
1349: pon_forms_sections_tl,
1346: from pon_fields,
1347: pon_fields_tl,
1348: pon_forms_sections,
1349: pon_forms_sections_tl,
1350: pon_form_section_compiled
1351: where
1352: pon_forms_sections.FORM_CODE = 'ABSTRACT'
1353: and pon_forms_sections.STATUS = 'ACTIVE'
1354: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1350: pon_form_section_compiled
1351: where
1352: pon_forms_sections.FORM_CODE = 'ABSTRACT'
1353: and pon_forms_sections.STATUS = 'ACTIVE'
1354: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1355: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1356: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1357: and pon_form_section_compiled.FIELD_CODE is not null
1358: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1352: pon_forms_sections.FORM_CODE = 'ABSTRACT'
1353: and pon_forms_sections.STATUS = 'ACTIVE'
1354: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1355: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1356: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1357: and pon_form_section_compiled.FIELD_CODE is not null
1358: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1359: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1360: and pon_fields_tl.LANGUAGE = g_base_language
1353: and pon_forms_sections.STATUS = 'ACTIVE'
1354: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1355: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1356: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1357: and pon_form_section_compiled.FIELD_CODE is not null
1358: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1359: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1360: and pon_fields_tl.LANGUAGE = g_base_language
1361: and pon_forms_sections_tl.LANGUAGE = g_base_language
1354: and pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1355: and pon_forms_sections.FORM_ID = pon_forms_sections_tl.FORM_ID
1356: and pon_form_section_compiled.TYPE = 'FORM_FIELD'
1357: and pon_form_section_compiled.FIELD_CODE is not null
1358: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1359: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1360: and pon_fields_tl.LANGUAGE = g_base_language
1361: and pon_forms_sections_tl.LANGUAGE = g_base_language
1362: and nvl(pon_form_section_compiled.display_on_main_page, 'N') = 'Y'
1358: and pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE
1359: and pon_fields.FIELD_CODE = pon_fields_tl.FIELD_CODE
1360: and pon_fields_tl.LANGUAGE = g_base_language
1361: and pon_forms_sections_tl.LANGUAGE = g_base_language
1362: and nvl(pon_form_section_compiled.display_on_main_page, 'N') = 'Y'
1363: order by
1364: internal_sequence_number;
1365:
1366: mainDoc JDR_DOCBUILDER.DOCUMENT;
1535: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_FORM';
1536:
1537: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
1538:
1539: SELECT pon_form_section_compiled.FORM_ID,
1540: pon_form_section_compiled.TYPE,
1541: pon_form_section_compiled.FIELD_CODE,
1542: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1543: pon_form_section_compiled.REQUIRED,
1536:
1537: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
1538:
1539: SELECT pon_form_section_compiled.FORM_ID,
1540: pon_form_section_compiled.TYPE,
1541: pon_form_section_compiled.FIELD_CODE,
1542: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1543: pon_form_section_compiled.REQUIRED,
1544: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1537: CURSOR V_FORM_FIELDS_CURSOR(p_form_id NUMBER) is
1538:
1539: SELECT pon_form_section_compiled.FORM_ID,
1540: pon_form_section_compiled.TYPE,
1541: pon_form_section_compiled.FIELD_CODE,
1542: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1543: pon_form_section_compiled.REQUIRED,
1544: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1545: pon_forms_sections.FORM_CODE SECTION_CODE,
1538:
1539: SELECT pon_form_section_compiled.FORM_ID,
1540: pon_form_section_compiled.TYPE,
1541: pon_form_section_compiled.FIELD_CODE,
1542: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1543: pon_form_section_compiled.REQUIRED,
1544: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1545: pon_forms_sections.FORM_CODE SECTION_CODE,
1546: pon_fields.DATATYPE,
1539: SELECT pon_form_section_compiled.FORM_ID,
1540: pon_form_section_compiled.TYPE,
1541: pon_form_section_compiled.FIELD_CODE,
1542: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1543: pon_form_section_compiled.REQUIRED,
1544: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1545: pon_forms_sections.FORM_CODE SECTION_CODE,
1546: pon_fields.DATATYPE,
1547: pon_fields.SYSTEM_FLAG,
1540: pon_form_section_compiled.TYPE,
1541: pon_form_section_compiled.FIELD_CODE,
1542: pon_form_section_compiled.MAPPING_FIELD_VALUE_COLUMN,
1543: pon_form_section_compiled.REQUIRED,
1544: NVL (pon_form_section_compiled.LEVEL1_SECTION_ID, -1) SECTION_ID,
1545: pon_forms_sections.FORM_CODE SECTION_CODE,
1546: pon_fields.DATATYPE,
1547: pon_fields.SYSTEM_FLAG,
1548: pon_fields.VALUE_SET_NAME,
1547: pon_fields.SYSTEM_FLAG,
1548: pon_fields.VALUE_SET_NAME,
1549: pon_fields_tl.FIELD_NAME,
1550: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1551: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1552: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1553: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID
1554: FROM PON_FORM_SECTION_COMPILED,
1555: PON_FIELDS,
1548: pon_fields.VALUE_SET_NAME,
1549: pon_fields_tl.FIELD_NAME,
1550: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1551: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1552: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1553: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID
1554: FROM PON_FORM_SECTION_COMPILED,
1555: PON_FIELDS,
1556: PON_FIELDS_TL,
1549: pon_fields_tl.FIELD_NAME,
1550: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1551: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1552: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1553: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID
1554: FROM PON_FORM_SECTION_COMPILED,
1555: PON_FIELDS,
1556: PON_FIELDS_TL,
1557: PON_FORMS_SECTIONS
1550: pon_fields_tl.DESCRIPTION FIELD_DESCRIPTION,
1551: pon_form_section_compiled.INTERNAL_SEQUENCE_NUMBER,
1552: NVL(pon_form_section_compiled.LEVEL2_SECTION_ID, -1) LEVEL2_SECTION_ID,
1553: NVL(pon_form_section_compiled.REPEATING_SECTION_ID, -1) REPEATING_SECTION_ID
1554: FROM PON_FORM_SECTION_COMPILED,
1555: PON_FIELDS,
1556: PON_FIELDS_TL,
1557: PON_FORMS_SECTIONS
1558: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1554: FROM PON_FORM_SECTION_COMPILED,
1555: PON_FIELDS,
1556: PON_FIELDS_TL,
1557: PON_FORMS_SECTIONS
1558: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1559: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1560: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1561: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1562: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1555: PON_FIELDS,
1556: PON_FIELDS_TL,
1557: PON_FORMS_SECTIONS
1558: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1559: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1560: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1561: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1562: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1563: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1556: PON_FIELDS_TL,
1557: PON_FORMS_SECTIONS
1558: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1559: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1560: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1561: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1562: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1563: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1564: ORDER BY
1557: PON_FORMS_SECTIONS
1558: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1559: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1560: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1561: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1562: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1563: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1564: ORDER BY
1565: INTERNAL_SEQUENCE_NUMBER;
1558: WHERE pon_form_section_compiled.FIELD_CODE = pon_fields.FIELD_CODE(+)
1559: AND pon_form_section_compiled.FIELD_CODE = pon_fields_tl.FIELD_CODE(+)
1560: AND pon_forms_sections.FORM_ID = pon_form_section_compiled.FORM_ID
1561: AND pon_form_section_compiled.FORM_ID = P_FORM_ID
1562: AND NVL(pon_form_section_compiled.ENABLED, 'Y') = 'Y'
1563: AND pon_fields_tl.LANGUAGE(+) = g_base_language
1564: ORDER BY
1565: INTERNAL_SEQUENCE_NUMBER;
1566:
1625: v_curr_formfieldvaluesvo_name VARCHAR2(100);
1626: v_top_formfieldvaluesvo_name VARCHAR2(100);
1627: v_display_type VARCHAR2(1);
1628: v_validation_type VARCHAR2(1);
1629: v_prev_record_type PON_FORM_SECTION_COMPILED.TYPE%TYPE;
1630:
1631: rval INTEGER;
1632: dataEntryRegion JDR_DOCBUILDER.DOCUMENT := NULL;
1633: readOnlyRegion JDR_DOCBUILDER.DOCUMENT := NULL;