Presentation on theme: "Flex Your APEX Implementing Oracle E-Business Suite Descriptive Flexfields in Application Express Shane Bentz InterVarsity Christian Fellowship/USA."— Presentation transcript:
Flex Your APEX Implementing Oracle E-Business Suite Descriptive Flexfields in Application Express Shane Bentz InterVarsity Christian Fellowship/USA
3 Descriptive Flexfield Introduction Descriptive flexfields provide a flexible way for Oracle Applications to provide customizable "spaces" within a page or pages of an application. (http://www.oracle.com/technology/tech/blaf/specs/flexfields.html)http://www.oracle.com/technology/tech/blaf/specs/flexfields.html Generic columns (traditionally called attributes) have two general purposes: potential future use storing mutually exclusive data to conserve space
4 Descriptive Flexfield Introduction A dedicated governing column (traditionally named ATTRIBUTE_CATEGORY) is used to define a context-sensitive purpose for these generic columns. Example: Payment Types (Credit Card, Cash, E-Pay, etc.) Each generic attribute column can be assigned a validation rule called a value set.
5 Descriptive Flexfield Introduction Necessary Rules (for this method): Value sets assigned to attributes must have a validation type of Table. If an attribute column is defined as a free- form text item, there should be no value set assigned to it.
6 General Overview Application Express Items and Processes: Multiple versions (Text Field, Select List, and Pop-Up Key LOV) of ATTRIBUTE items on your Application Express page Two on-demand application-level processes and one application-level item
8 Page Items Create the following items: an ATTRIBUTE_CATEGORY item which governs which attribute items are displayed. a Text Field, Select List, and Pop-Up Key LOV version of each attribute database column hidden items for each attribute to store the value set ID if the attribute has a table-based value set and the help text retrieved from the flexfield definition
9 Page Items Page items needing to be created:
10 Page Items (Pop-Up Key LOV) Pop-Up Key LOV items should have the following characteristic: a List of Values source which calls a packaged function to dynamically build the validation list. Example: begin return ( generate_attribute_lov ( :p6_attribute1_vset_id ) ); end;
11 Application-Level Processes CREATE_DYNAMIC_LOV – generates XML of a list of valid options to be assigned to a select list GET_ATTRIBUTES – generates XML to describe the needed attributes the name of the attribute column the attributes label the value set ID of the value set for validation flag indicating if the value set is a long list help text stored in the description of the flexfield column if fetching an existing record, the current value stored in the attribute database column and its description
12 Application-Level Item APPL_LEVEL_VSET_ID accessed by the CREATE_DYNAMIC_LOV on- demand application-level process to build the list of options of a select list. as the AJAX code loops through each attribute item, this item temporarily stores the value set ID of the attribute currently being processed.
13 Stored Functions GENERATE_ATTRIBUTE_LOV returns the SELECT statement representing the value set associated with current attribute column to generate the list of options example: select description, code from master_lookup_table order by description; GET_ATTRIBUTE_DESCRIPTION returns the description of a code stored in an attribute column
18 Label Template Specifications Two required specifications to dynamically change the label:
19 Fetch and DML Processing The SELECT Before Header process looks up the metadata description of the current record in order to know in which version of the attribute items to place the information. The INSERT and UPDATE After Submit processes assume only the appropriate version of the attribute item will contain the current value. It is important that only one version of the item contains the value.
20 Fetch and DML Processing The INSERT and UPDATE After Submit processes assume only the appropriate version of the attribute item will contain the current value.
21 Potential Future Improvements Dynamically implement the required checkbox of an attribute column Addition of a date picker or other item types. Dynamically create the items (using APEX_ITEM) instead of hiding and showing appropriate versions.
23 Contact Information Shane Bentz Application Development Mgr. InterVarsity Christian Fellowship/USA 6400 Schroeder Road Madison, Wisconsin Copyright 2008