Professional Documents
Culture Documents
Oracle Defining Flexfields
Oracle Defining Flexfields
Student Guide
Copyright Oracle Corporation, 2000. All rights reserved. This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: Restricted Rights Legend Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). This material or any portion of it may not be copied in any form or by any means without the express prior written permission of the Education Products group of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties. If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with Restricted Rights, as defined in FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987). The information in this document is subject to change without notice. If you find any problems in the documentation, please report them in writing to Worldwide Education Services, Oracle Corporation, 500 Oracle Parkway, Box SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is error-free. Oracle and all references to Oracle Products are trademarks or registered trademarks of Oracle Corporation. All other products or company names are used for identification purposes only, and may be trademarks of their respective owners.
Authors Clara Jaeckel, Richard Sears Technical Contributors and Reviewers Nic Atkin, Phil Cannon, Millie Wang
Oracle Tutor
Table of Contents
Overview of Flexfields ...........................................................................................................1-1 Overview of Flexfields ........................................................................................................1-2 Objectives ............................................................................................................................1-3 Overview .............................................................................................................................1-4 Customizing Oracle Applications ........................................................................................1-5 Flexfield Structures and Flexfield Segments .......................................................................1-6 Segment Prompts and Value Descriptions...........................................................................1-7 Validating Input Using Value Sets ......................................................................................1-8 Practice 1-1 ..........................................................................................................................1-9 Key and Descriptive Flexfields............................................................................................1-12 Key Flexfields......................................................................................................................1-13 Intelligent Keys....................................................................................................................1-14 Key Flexfield Example: Accounting Flexfield ....................................................................1-16 Key Flexfield Example: Asset Category Flexfield ..............................................................1-17 Oracle Applications Key Flexfields.....................................................................................1-18 Descriptive Flexfields ..........................................................................................................1-19 Using Reference Fields........................................................................................................1-20 Using Different Contexts: Asset Category Flexfield ...........................................................1-21 Oracle Applications Descriptive Flexfields (Partial) ..........................................................1-22 SRS and Flexfields ..............................................................................................................1-23 Benefits of Flexfields...........................................................................................................1-24 Storing Flexfield Data Internally .........................................................................................1-25 Practice 1-2 ..........................................................................................................................1-26 Implementing a Flexfield Steps ..........................................................................................1-28 Overview of Flexfields Summary........................................................................................1-29 Using Value Sets.....................................................................................................................2-1 Using Value Sets..................................................................................................................2-2 Objectives ............................................................................................................................2-3 Overview .............................................................................................................................2-4 Validating Input Using Value Sets ......................................................................................2-5 Planning a Value Set............................................................................................................2-6 Types of Value Sets .............................................................................................................2-7 Validation Type None..........................................................................................................2-9 Independent Value Sets .......................................................................................................2-10 Dependent Value Sets..........................................................................................................2-11 Table-Validated Value Sets .................................................................................................2-12 Specialized Validation Types ..............................................................................................2-13 Translatable Independent Value Sets...................................................................................2-14 Translatable Dependent Value Sets .....................................................................................2-15 Validation Types: Summary ................................................................................................2-16 Practice 2-1 ..........................................................................................................................2-17 Planning Value Sets.............................................................................................................2-19 Value Set Attributes.............................................................................................................2-20 Planning Format Validation.................................................................................................2-21 Format Types and Options...................................................................................................2-22 Char and Number Format Editing........................................................................................2-23 Time, Standard Date, and Standard DateTime Format Editing ...........................................2-24 Format Interaction ...............................................................................................................2-25 Formatting Requirements for Translatable Value Sets ........................................................2-26 Practice 2-2 ..........................................................................................................................2-27 Planning Validation Strategy ...............................................................................................2-28
Copyright Oracle Corporation, 2000. All rights reserved.
Planning Value Sets and Their Values.................................................................................2-30 Planning Dependent Value Sets...........................................................................................2-31 Defining Value Sets.............................................................................................................2-32 Predefined Value Sets..........................................................................................................2-33 Using Existing Value Sets ...................................................................................................2-34 Value Set Usage by Key Flexfields .....................................................................................2-35 Value Set Usage by Descriptive Flexfields..........................................................................2-36 Defining a New Value Set ...................................................................................................2-38 Defining a Dependent or Translatable Dependent Value Set ..............................................2-39 Selecting a Value Set for Value Definition..........................................................................2-40 Defining Values for a Dependent or Translatable Dependent Value Set.............................2-41 Defining Values for a Value Set ..........................................................................................2-42 Modifying Value Definitions...............................................................................................2-43 Value Hierarchies ................................................................................................................2-44 Defining Value Hierarchies and Qualifiers..........................................................................2-46 Summary..............................................................................................................................2-47 Defining Key Flexfields .........................................................................................................3-1 Defining Key Flexfields.......................................................................................................3-2 Objectives ............................................................................................................................3-3 Overview .............................................................................................................................3-4 Intelligent Keys....................................................................................................................3-5 Key Flexfields Dual Purpose..............................................................................................3-6 Oracle Applications Key Flexfields.....................................................................................3-7 Implementing Key Flexfields ..............................................................................................3-8 Key Flexfield Structures ......................................................................................................3-9 Code Combinations .............................................................................................................3-10 Storing Code Combinations.................................................................................................3-11 Key Flexfield Application Tables........................................................................................3-12 Key Flexfield Qualifiers ......................................................................................................3-14 Types of Qualifiers ..............................................................................................................3-15 Flexfield Qualifiers..............................................................................................................3-16 Oracle Applications Key Flexfields Using Qualifiers ........................................................3-17 Segment Qualifiers ..............................................................................................................3-18 Other Key Flexfield Options................................................................................................3-19 Allowing Dynamic Insertion ...............................................................................................3-20 Cross-Validating Values ......................................................................................................3-21 Using Value Set Security.....................................................................................................3-22 Using Shorthand Aliases......................................................................................................3-23 Planning Decisions ..............................................................................................................3-24 Designing the Key Flexfield Layout....................................................................................3-26 Designing Segments ............................................................................................................3-27 Specifying Default Values ...................................................................................................3-28 Planning Key Flexfield Values ............................................................................................3-30 Definition Procedure............................................................................................................3-31 Defining Value Sets.............................................................................................................3-32 Accessing the Key Flexfield Definition...............................................................................3-33 Specifying Flexfield Behavior .............................................................................................3-34 Defining Segment Attributes ...............................................................................................3-35 Defining Validation and Size Attributes..............................................................................3-36 Defining Flexfield Qualifiers...............................................................................................3-37 Freezing and Compiling the Definition ...............................................................................3-38 Defining Value Set Values ..................................................................................................3-39 Defining Segment Qualifiers ...............................................................................................3-40 Defining Value Hierarchies .................................................................................................3-41 Account Generator...............................................................................................................3-42 Practice 3-1 ..........................................................................................................................3-43
Copyright Oracle Corporation, 2000. All rights reserved.
Practice 3-2 ..........................................................................................................................3-54 Defining Key Flexfields Summary .....................................................................................3-62 Using Additional Flexfield Options ......................................................................................4-1 Using Additional Flexfield Options.....................................................................................4-2 Objectives ............................................................................................................................4-3 Overview .............................................................................................................................4-6 Cross-Validating Values ......................................................................................................4-7 Cross-Validation Rule Syntax .............................................................................................4-8 Data Type Specifications and Cross-Validation Rules ........................................................4-9 Preparing for Cross-Validation ............................................................................................4-10 Defining Cross-Validation Rules.........................................................................................4-11 Cross-Validation Reports.....................................................................................................4-12 Comparing Cross-Validation and Security Rules ................................................................4-13 Practice 4-1 ..........................................................................................................................4-14 Using Shorthand Aliases......................................................................................................4-16 Using Full and Partial Aliases .............................................................................................4-17 Typical Key Flexfields Using Aliases .................................................................................4-18 Defining an Alias.................................................................................................................4-19 Defining an Alias Template.................................................................................................4-20 Recompiling the Flexfield Definition ..................................................................................4-21 Flexfields: Shorthand Entry Profile Option .........................................................................4-22 Flexfields: Show Full Value Profile Option ........................................................................4-23 Modifying Existing Alias Definitions..................................................................................4-24 Practice 4-2 ..........................................................................................................................4-25 Securing Value Set Access ..................................................................................................4-27 Security and Value Sets .......................................................................................................4-28 Constructing Security Rules ................................................................................................4-29 Specifying Acceptable Values .............................................................................................4-30 Using Multiple Clauses........................................................................................................4-31 Rules with Overlapping Values ...........................................................................................4-32 Rules Without Overlapping Values .....................................................................................4-33 Implementing Flexfield Security .........................................................................................4-34 Enabling Security for a Value Set........................................................................................4-35 Enabling Security for a Segment .........................................................................................4-36 Enabling Security for a Program Parameter ........................................................................4-38 Defining Security Rules.......................................................................................................4-39 Assigning Security Rules.....................................................................................................4-40 Practice 4-3 ..........................................................................................................................4-42 Summary..............................................................................................................................4-45 Defining Descriptive Flexfields .............................................................................................5-1 Defining Descriptive Flexfields...........................................................................................5-2 Objectives ............................................................................................................................5-3 Overview .............................................................................................................................5-4 Planning a Descriptive Flexfield..........................................................................................5-5 Using Descriptive Flexfields ...............................................................................................5-7 Typical Descriptive Flexfield Information ..........................................................................5-8 Some Oracle Applications Descriptive Flexfields ...............................................................5-9 Identifying a Descriptive Flexfield ......................................................................................5-10 Determining the Descriptive Flexfield Name ......................................................................5-11 Determining Available Resources .......................................................................................5-13 Planning Questions ..............................................................................................................5-14 Identifying Your Information ..............................................................................................5-15 Grouping Information By Usage .........................................................................................5-16 Isolate Common Information...............................................................................................5-17 Determine Different Contexts..............................................................................................5-18
Descriptive Flexfield Components ......................................................................................5-19 Global Segments..................................................................................................................5-20 Context-Sensitive Segments ................................................................................................5-21 Distinguishing Between Contexts........................................................................................5-22 Reference and Context Fields ..............................................................................................5-23 Using Reference Fields........................................................................................................5-24 Identifying Referenceable Columns ....................................................................................5-25 Using Context Fields ...........................................................................................................5-26 Planning Flexfields: Global Segments Only........................................................................5-27 Planning Flexfields: Context Segments Only .....................................................................5-28 Planning Flexfields: Global and Context Fields ..................................................................5-29 Specifying the Flexfield Attributes......................................................................................5-30 Specifying the Context Field Information ...........................................................................5-31 Specifying the Segment Attributes ......................................................................................5-32 Storing Descriptive Flexfield Segments ..............................................................................5-33 Descriptive Flexfield Application Tables ............................................................................5-34 Specifying the Segment Detail Attributes............................................................................5-35 Specifying Default Values ...................................................................................................5-38 Defining a Descriptive Flexfield..........................................................................................5-40 Defining Value Sets.............................................................................................................5-41 Locating the Flexfield Definition.........................................................................................5-42 Defining the Flexfield Header Attributes.............................................................................5-43 Defining Segment Attributes ...............................................................................................5-44 Specifying Validation and Field Sizes.................................................................................5-45 Freezing and Compiling the Definition ...............................................................................5-46 Defining Context Field Information ....................................................................................5-47 Defining Context-Sensitive Segments .................................................................................5-48 Defining Values for a Value Set ..........................................................................................5-49 Practice 5-1 ..........................................................................................................................5-50 Practice 5-2 ..........................................................................................................................5-58 Practice 5-3 ..........................................................................................................................5-63 Practice 5-4 ..........................................................................................................................5-70 Summary..............................................................................................................................5-77 Using Advanced Validation Capabilities .............................................................................6-1 Using Advanced Validation Capabilities.............................................................................6-2 Objectives ............................................................................................................................6-3 Overview .............................................................................................................................6-4 Advanced Validation Options..............................................................................................6-5 Table-Validated Value Sets .................................................................................................6-6 Defining a Table-Validated Value Set .................................................................................6-7 Restricting Values Retrieved from a Table..........................................................................6-8 Limitations on Using SQL WHERE Clauses ......................................................................6-9 Using Multiple Tables for Validation ..................................................................................6-10 Practice 6-1 ..........................................................................................................................6-11 Other Advanced Validation Options....................................................................................6-14 Using $PROFILES$ ............................................................................................................6-15 Using :block.field ................................................................................................................6-16 Using $FLEX$.....................................................................................................................6-17 Cascading Dependencies Using $FLEX$ ............................................................................6-18 Practice 6-2 ..........................................................................................................................6-19 Using Special Value Sets.....................................................................................................6-26 Using Pair Value Sets ..........................................................................................................6-27 Summary..............................................................................................................................6-28
Preface
Profile
Before You Begin This Course Before you begin this course, you should have the following qualifications: Thorough knowledge of the Oracle Application you will be implementing or supporting Working experience with navigating Oracle Applications forms and windows
How This Course Is Organized R11i Defining Flexfields is an instructor-led course featuring lecture and hands-on exercises. Online demonstrations and written practice sessions reinforce the concepts and skills introduced.
Related Publications
Oracle Publications Title Oracle Applications Flexfields Guide Additional Publications System release bulletins Installation and users guides read.me files Oracle Magazine Part Number A75393-01
Typographic Conventions
Typographic Conventions in Text
Element Glossary term (if there is a glossary) Buttons, check boxes, triggers, windows Code output, directory names, filenames, passwords, pathnames, URLs, user input, usernames Graphics labels (unless the term is a proper noun) Emphasized words and phrases, titles of books and courses, variables Interface elements with long names that have only initial caps; lesson and chapter titles in crossreferences SQL column names, commands, functions, schemas, table names
Example The algorithm inserts the new key. Click the Executable button. Select the Cant Delete Card check box. Assign a When-Validate-Item trigger to the ORD block. Open the Master Schedule window. Code output: debug.set (I, 300); Directory: bin (DOS), $FMHOME (UNIX) Filename: Locate the init.ora file. Password: User tiger as your password. Pathname: Open c:\my_docs\projects URL: Go to http://www.oracle.com User input: Enter 300 Username: Log on as scott Customer address (but Oracle Payables)
Initial cap
Italic
Quotation marks
Do not save changes to the database. For further information, see Oracle7 Server SQL Language Reference Manual. Enter user_id@us.oracle.com, where user_id is the name of the user. Select Include a reusable module component and click Finish. This subject is covered in Unit II, Lesson 3, Working with Objects.
Uppercase
Use the SELECT command to view information stored in the LAST_NAME column of the EMP table.
Example Select File> Save. Press [Enter]. Press and release keys one at a time: [Alternate], [F], [D] Press and hold these keys simultaneously: [Ctrl]+[Alt]+[Del]
Element Oracle Forms triggers Column names, table names Passwords PL/SQL objects
Example When-Validate-Item SELECT last_name FROM s_emp; DROP USER scott IDENTIFIED BY tiger; OG_ACTIVATE_LAYER (OG_GET_LAYER (prod_pie_layer))
Syntax variables
Typographic Conventions in Navigation Paths This course uses simplified navigation paths, such as the following example, to direct you through Oracle Applications. (N) Invoice > Entry > Invoice Batches Summary (M) Query > Find (B) Approve
This simplified path translates to the following:
1.
(N) From the Navigator window, select Invoice > Entry > Invoice Batches Summary. (M) From the menu, select Query > Find. (B) Click the Approve button.
2. 3.
Notations : (N) = Navigator (M) = Menu (T) = Tab (I) = Icon (H) = Hyperlink (B) = Button Typographical Conventions in Help System Paths This course uses a navigation path convention to represent actions you perform to find pertinent information in the Oracle Applications Help System. The following help navigation path, for example (Help) General Ledger > Journals > Enter Journals represents the following sequence of actions: 1. In the navigation frame of the help system window, expand the General Ledger entry. Under the General Ledger entry, expand Journals. Under Journals, select Enter Journals. Review the Enter Journals topic that appears in the document frame of the help system window.
2. 3. 4.
Getting Help
Oracle Applications provides you with a complete online help facility. Whenever you need assistance, simply choose an item from the Help menu to pinpoint the type of information you want.
Copyright Oracle Corporation, 2000. All rights reserved.
To display help for a current window: 1. Choose Window Help from the Help menu, click the Help button on the toolbar, or hold down the Control key and type 'h'. A web browser window appears, containing search and navigation frames on the left, and a frame that displays help documents on the right. The document frame provides information on the window containing the cursor. The navigation frame displays the top-level topics for your responsibility, arranged in a tree control. 2. If the document frame contains a list of topics associated with the window, click on a topic of interest to display more detailed information. You can navigate to other topics of interest in the help system, or choose Close from your web browser's File menu to close help.
3.
Searching for Help You can perform a search to find the Oracle Applications help information you want. Simply enter your query in the text field located in the top-left frame of the browser window when viewing help, then click the adjacent Find button. A list of titles, ranked by relevance and linked to the documents in question, is returned from your search in the right-hand document frame. Click on whichever title seems to best answer your needs to display the complete document in this frame. If the document doesn't fully answer your questions, use your browser's Back button to return to the list of titles and try another.
Overview of Flexfields
Chapter 1
Overview of Flexfields
Objectives
Objectives Objectives
After After completing completing this this lesson, lesson, you you should should be be able able to to do do the the following: following: Explain Explain flexfields flexfields and and how how they they are are used used by by Oracle Oracle Applications Applications Distinguish Distinguish between between key key and and descriptive descriptive flexfields flexfields
Identify Identify key key and and descriptive descriptive flexfields flexfields used used by by Oracle Oracle Applications Applications List List the the benefits benefits provided provided by by flexfields flexfields
Lesson Topics This lesson describes how to use modifiable fields called flexfields to tailor Oracle Applications to reflect your business needs and practices. You can use flexfields to define the structure of certain data identifiers required by Oracle Applications. You can also gather, store and process additional data that may be required by your business. After completing this lesson, you should be able to: Explain flexfields and how they are used by Oracle Applications Distinguish between key and descriptive flexfields Identify key and descriptive flexfields used by Oracle Applications. List the benefits provided by flexfields
Overview
Overview Overview
How How flexfields flexfields operate operate Two Two types types of of flexfields flexfields Flexfield Flexfield terminology terminology Flexfield Flexfield benefits benefits
Lesson Overview This lesson describes how Oracle Applications uses customizable fields called flexfields to modify and expand processing. Specifically it covers: How flexfields operate The two types of flexfields Flexfield terminology Flexfield benefits
Oracle Assets
Using Flexfields to Customize Applications A flexfield is a customizable field that opens in a window from a regular Oracle Applications window. Defining flexfields enables you to tailor Oracle Applications to your own business environment. You can easily define flexfields to modify or extend Oracle Applications without programming. By using flexfields within Oracle Applications you can: Structure certain identifiers required by Oracle Applications according to your own business environment Collect and display additional information for your business as needed Flexfields are important because they are used throughout Oracle Applications. Flexfields provide many opportunities for easy modification and customization of standard Oracle Applications processing. Members of the system implementation team as well as system administration personnel should be familiar with the concepts and procedures of flexfields to design and support an Oracle Applications environment that meets the needs of all its users.
Flexfield Flexfield Structures Structures and and Flexfield Flexfield Segments Segments
Item Information Flexfield
Segments:
(Category, Item, Color)
__ Item Information _______________ Category Item Color COM 876 LTN Computer Monitor Light tan
Structure:
(Category Segment + Item Segment + Color Segment)
Flexfield Components A flexfield is composed of segments. The segments of a flexfield contain the flexfield values. Flexfield segments are combined in a grouping called a structure. The segments that make up a particular structure are logically or functionally related. A single flexfield can have more than one structure. When you implement a flexfield, you decide how many segments you need for a particular structure and whether you need multiple structures. Being able to define different structures for the same flexfield allows you to tailor the same flexfield to the needs of different end users. The example on the slide shows three segments: Category Item Color These three segments together form a structure.
Segment Segment Prompts Prompts and and Value Value Descriptions Descriptions
Flexfield segment prompts __ Item Information _______________ Category Item Color COM 876 LTN Computer Monitor Light tan
Customizing the Flexfield Appearance In addition to defining the segments and structures that make up the flexfield, you can define the appearance of the flexfield. You can specify names and descriptions for the segments appearing on the window. You can also specify the display size for the fields.
Validating Validating Input Input Using Using Value Value Sets Sets
Category value set COM MACH FURN
__ Item Information _______________ Category Item Color 755 COM 876 LTN 876 Computer Monitor Light tan 933
Using Value Sets with Flexfields Value sets allow you to control the values for a segment or a report parameter. A value set is a definition of the values approved for entry or display by a particular flexfield segment. A value set may also contain a list of actual approved values although this is not required. You may be able to define the appropriate values after you define the value set. Value Sets Describe Acceptable Types of Values Some value sets permit a limited range of values; others permit only certain values; others have minimal restrictions. Different flexfields can share the same value set. For example, a value set containing the names of regional offices could be used by many different flexfields. Different segments of the same flexfield can use the same value set, for example a date value set. Segments defined to different structures of the same flexfield can share value set. Many of the report parameters used with SRS forms are tied to shared value sets. Value sets do not have to have the actual values defined for them.
Practice 1-1
Practice 1-1 Instructions Answer the following questions. 1 You can extend and customize the processing of Oracle Applications by using customizable fields called __________. 2 Flexfields are composed of __________. 3 The fields that appear on a flexfield are combined in a grouping called a __________. 4 List two ways that flexfields enable you to customize the operation of Oracle Applications.
Practice 1-1
[]
7
COM APPL FURN
4
Computer Appliances Furniture
__ Item Details _______________ Type Sales Rep COM JR Computer Jane Reed
Practice 1-1 Instructions (continued) 5 Match the numbered elements in the diagram above with the appropriate names from the list. Flexfield title: __________ Value set: __________ Descriptive flexfield indicator: __________ Flexfield segments: __________ Value set values: __________ Flexfield window prompt: __________ Value descriptions: __________ Practice 1-1 Solutions 1 You can extend and customize the processing of Oracle Applications by using customizable fields called flexfields. 2 Flexfields are composed of segments. 3 The fields that appear on a flexfield are combined in a grouping called a structure. 4 List two ways that flexfields enable you to customize the operation of Oracle Applications. Define the structure of required identifiers
Copyright Oracle Corporation, 2000. All rights reserved.
Gather additional information 5 Match the numbered elements in the diagram above with the appropriate names from the list. Flexfield title: 3 Value set: 5 Descriptive flexfield indicator: 1 Flexfield segments: 2 Value set values: 7 Flexfield window prompt: 6 Value descriptions: 4
__ Item Information _________ Category Item Color COM 876 LTN Computer Monitor Light tan
Different Types of Flexfields There are two types of flexfields, key flexfields and descriptive flexfields. Each type is discussed in more detail on the following slides. The main differences are: You use key flexfields to define your own structure for many of the identifiers required by Oracle Applications. You use descriptive flexfields to gather additional information about your business entities beyond the information required by Oracle Applications.
Key Flexfields
[]
__ Item Information _______________ Category Item Color COM 876 LTN Computer Monitor Light tan
Key Flexfields In Oracle Applications you use key flexfields as identifiers for entities. Generally, the identifier you create using a key flexfield is required by the application (for example, the Accounting Flexfield builds the account number used by Oracle General Ledger). A key flexfield appears as a normal field on a form. Any existing value for the key appears in the field as a concatenated value having segment separators. You can use the Flexfields: Open Key Window profile option to specify whether you want the key flexfield window to be opened automatically when you navigate to the key flexfield on the base form. This profile option is visible and updatable at the user level. A key flexfield structure usually consists of multiple segments, each of which contains meaningful information. The resulting combinations of values from these segments therefore function as intelligent keys.
Intelligent Keys
_____Account Entry __
Corporation Subsidiary Division Department Account 10 203 3003 025 203
_____Account Entry __
Company Division Department Account 21 42 502 015
Using Key Flexfields to Build Intelligent Keys Intelligent keys are multipart codes where the value in each individual part contains meaningful information. Each combination of values can therefore identify a particular business entity or class of entities. Such intelligent key structures are used throughout Oracle Applications. Because you define your key flexfield structure yourself, it reflects the organization of your business. Accounting Flexfield Example One important key flexfield is the Accounting Flexfield. The example on the slide shows how two hypothetical businesses could define Accounting Flexfield structures that reflected their different accounting structures. Business As accounting structure has five segments, while business Bs accounting structure has four segments. Additional Key Flexfield Features You can define value sets to control the allowable values for each segment of the key. You can also define cross-validation rules to control the allowable combinations of segment values within the key.
Intelligent Keys
Asset number
Account number
Serial number
Job grade
Intelligent Key Examples There are many areas in business where you can use intelligent keys. Some examples are shown. Many such intelligent keys are used in Oracle Applications to represent such entities.
Key Key Flexfield Flexfield Example: Example: Accounting Accounting Flexfield Flexfield
The Accounting Flexfield The Accounting Flexfield is used to create and display account numbers. The Accounting Flexfield is owned by Oracle General Ledger, but Accounting Flexfield values are used by many of the financial applications. The example shows an Accounting Flexfield structure consisting of five segments.
Key Key Flexfield Flexfield Example: Example: Asset Asset Category Category Flexfield Flexfield
The Asset Category Flexfield You use the Asset Category flexfield in Oracle Inventory to identify major groupings of inventory. The example shows a key flexfield structure that has two segments.
Accounting
Oracle Inventory
Account Aliases Item Catalogs Item Categories Sales Orders Stock Locators System Items
Grade Oracle Job Human Personal Analysis Resources Position Soft Coded
Key Flexfields Within Oracle Applications Many Oracle applications have key flexfields. The slide shows some of the applications and the key flexfields they use. In many cases, you must implement the key flexfield to implement the application. Many key flexfields are used by multiple applications. For example, the Accounting Flexfield is used by both Oracle General Ledger and Oracle Payables.
Descriptive Flexfields
Payment Type CK Store 54321 Dept 987 Number 1028 Second ID MC 4565-3939
Descriptive Flexfields You use descriptive flexfields to collect information beyond that collected by Oracle Applications. Using descriptive flexfields allows you to gather additional specialized information required by your business. The use of descriptive flexfields is optional. A descriptive flexfield appears on a form as a single-space field enclosed by brackets. You can use the Flexfields: Open Descr Window profile option to specify whether you want the descriptive flexfield window to be opened automatically when you navigate to the bracketed field, if the flexfield is enabled. This profile option is visible and updatable at the user level. A descriptive flexfield typically uses multiple structures. You can: Define a basic structure that gathers additional information for all entities. Define several different structures that gather specialized information for different types of the same general entity. Define a combination of the preceding two. This structure can gather general information about all entities and then optionally gather certain information about certain types of entities. The example shows a descriptive flexfield that gathers different payment information based on the type of payment: check (CK) or credit card (CC).
Reference field
Payment Type CK Store 54321 Dept 987 Number 1028 Second ID MC 4565-3939
Using Context and Reference Fields to Control Descriptive Flexfields The same descriptive flexfield often uses multiple structures. Each of these structures can have different segments and gather different data. When you define multiple structures for a descriptive flexfield, you can make the choice of structure either dependent on the value of another field or selectable by the user: If the value in a preceding field elsewhere on the form determines which structure is used, the preceding field is known as a reference field. However, if the descriptive flexfield is used in another form, then the two forms must have the same name for the reference field. If the value in a field within the flexfield itself determines which structure is used, that field is called a context field. The example on the slide shows a hypothetical window containing sales information. One of the fields on this window, Payment Type, is used as a reference field for a descriptive flexfield that contains information about how the customer will pay. In this example, the buyer is using a credit card so the credit card information is gathered by using the descriptive flexfield structure shown on the right. If payment is by check, you could gather check-related information by using the descriptive flexfield structure shown on the left.
Using Using Different Different Contexts: Contexts: Asset Asset Category Category Flexfield Flexfield
The Asset Category Flexfield The example on the slide shows the Asset Category descriptive flexfield. The descriptive flexfield is gathering further information about an office building asset. You can see this both by the value in the reference field, and by the type of information being requested on the flexfield. Note: In this example, the reference field is itself a key flexfield.
Oracle Oracle Applications Applications Descriptive Descriptive Flexfields Flexfields (Partial) (Partial)
Oracle Assets Oracle General Ledger Bonus Rates Calendar Types Price Indexes Oracle Payables Bank Branch Payment Terms Site Address
Daily Rates
Partial List of Oracle Applications Descriptive Flexfields Numerous descriptive flexfields are available throughout Oracle Applications. The slide shows only a partial list. In contrast to key flexfields, descriptive flexfields are not shared between applications.
Using Flexfields as Parameters Within Standard Request Submission Reports and concurrent programs submitted with Standard Request Submission often have parameter windows that pop up. These parameter windows behave similarly to descriptive flexfields. Parameter Windows Are Context Sensitive The window that appears and the segments that are contained in it depend on which request is being run. The request name acts as a reference field. Many request parameters have value sets associated with them to control the allowable values for that parameter. Such value sets are often shared by many other flexfields. You should always be careful when modifying any value sets that are also used by SRS processing.
Benefits of Flexfields
Use Use the the application application to to validate validate values values and and value value combinations entered by the user. combinations entered by the user. Support Support multiple multiple field field structures structures depending depending on on data data context. context.
Benefits of Flexfields You should now have a basic understanding of how flexfields are used by Oracle Applications. The ease of customizing flexfields provides many benefits to users. The main benefits are listed on the slide.
Key flexfield
Descriptive flexfield
Storing Flexfield Values in Database Tables The values entered through an applications flexfields are stored internally in that applications database tables: Each segments value is stored in a column in one of the base tables. The column name reflects the type of flexfield data it holds. In general, key flexfields store their data in columns called SEGMENTn, where n is a number. In general, descriptive flexfields store their data in columns called ATTRIBUTEn, where n is a number. The number of SEGMENT and ATTRIBUTE columns available for use by a flexfield varies between flexfields. Not all flexfields can have the same number of fields defined. When implementing a flexfield, determining the number of fields available for use is an important planning step.
Practice 1-2
Practice 1-2 Instructions 1 List the two types of flexfields used by Oracle Applications. 2 List two key flexfields used by Oracle Applications. 3 List two descriptive flexfields used by Oracle Applications. 4 A phone number has multiple parts. Does that make it an intelligent key? 5 Give an example of an identifier at your business for which you will define a key flexfield. 6 If possible, give an example of information you gather by using a descriptive flexfield. 7 Which of the two types of flexfields is optional? Practice 1-2 Solutions 1 List the two types of flexfields used by Oracle Applications. Key Descriptive 2 List two key flexfields used by Oracle Applications. Accounting Flexfield Item Categories (Any of the other key flexfields listed on the slide dealing with Oracle Applications key flexfields)
Copyright Oracle Corporation, 2000. All rights reserved.
4 5
List two descriptive flexfields used by Oracle Applications. Accounting Calendar: Periods Asset Category (Any of the other descriptive flexfields listed on the slide dealing with Oracle Applications descriptive flexfields, or any the student may have obtained directly from the application) A phone number has multiple parts. Does that make it an intelligent key? No, not all segments contain meaningful information. Give an example of an identifier at your business for which you will define a key flexfield. Answers will vary. If possible, give an example of information you gather by using a descriptive flexfield. Answers will vary. Which of the two types of flexfields is optional? Descriptive
Implementing a Flexfield: General Procedure Use the following steps when defining flexfields, both key and descriptive: Plan your flexfield structure and layout. Remember that many flexfields use more than one structure, and that each structure can consist of different segments. Also plan any value sets and their values. Define flexfield value sets. Value sets describe the allowable values for the flexfield segment. If you create your value sets first, you can refer to them while your are defining your flexfield segments in the following step. Define flexfield segments and structures. Use the plan you designed earlier. Define values for your value sets. For key flexfields, define security and cross-validation rules as necessary.
Summary Flexfields are Oracle Applications fields that you can customize. You can define the content and layout of the flexfield to reflect your own business needs. There are two types of flexfields: Key flexfields are used to create entity identifiers required by Oracle Applications. You can use key flexfields to structure these identifiers according to your business environment. The definition of many key flexfields is required by the application. You use descriptive flexfields to gather additional information for storage or processing. You can define descriptive flexfields in multiple ways to accommodate the needs of many different groups of users. The use of descriptive flexfields is optional.
Objectives
Objectives Objectives
After After completing completing this this lesson, lesson, you you should should be be able able to to do do the the following: following: List List options options for for validating validating flexfield flexfield segment segment values values
Choose Choose the the appropriate appropriate validation validation option option to to use use with with a a particular particular flexfield flexfield segment segment Identify Identify issues issues for for consideration consideration when when planning planning a a validation validation strategy strategy Define Define value value sets sets Specify Specify allowable allowable values values for for a a value value set set
Lesson Topics This lesson describes planning and using value sets to control input with flexfields. At the end of this lesson, you should be able to: List options for validating flexfield segment values and report parameters Choose the appropriate validation option to use with a particular segment Identify issues for consideration when planning a validation strategy Define new value sets Define allowable values for a value set
Overview
Overview Overview
Using Using value value sets sets to to validate validate input input Describing Describing types types of of value value sets sets Planning Planning value value sets sets and and values values Defining Defining value value sets sets
Lesson Overview Value sets are definitions of allowable values for use with a flexfield segment or report parameter. This lesson covers the different types of value sets and how each is used. It also describes how to plan the value set as well as the actual values for those sets that require a list of values. Finally, it covers the definition process itself.
Validating Validating Input Input Using Using Value Value Sets Sets
Category value set COM APPL FURN
755
933
Value Sets Define Allowable Values You can create a value set and assign it to a flexfield segment or report parameter to control what values that segment can use. Value Sets Check User Input Define a value set for each flexfield segment. A value set is a general definition of the values that are acceptable for a particular flexfield segment or report parameter. A value set can also have a list of actual values available to the segment, although this is not required. Other Advantages of Value Sets Value sets control which segments can use special features such as Longlist, value security, and segment value combination checking. The example in the slide shows two value sets: The Category value set specifies the allowable values for the Category segment. The Item value set specifies the allowable entries for the Item segment.
Planning Your Value Set There are several steps to planning your value set: 1 Determine the basic attributes for the set. Choose what conditions all values must fit to be considered valid values. Such criteria include data type (Character, Numeric), value length, and minimum and maximum values, if appropriate. 2 Select the appropriate validation strategy. Choose the type of validation most appropriate for the data. Validation types are discussed in the following pages. 3 Identify approved values, if appropriate. For some value sets, you know ahead of time the acceptable values. In these cases, in addition to defining the value set, you can also specify the values that appear when the user enters the flexfield segment. The segment accepts only values explicitly defined for that value set. For some value sets, it does not make sense to try to provide a complete list of all the approved values. For example, a segment containing customer telephone numbers probably does not need a list of values, because each new customer will have a new telephone number which you do not know at design time.
Types of Value Sets You can define several types of value sets depending on how you need your values to be checked. All value sets perform minimal checking; some value sets also check against the actual values, if you have provided any. None - A value set of the type None has no list of approved values associated with it. A None value set performs only minimal checking of, for example, data type and length. Independent - Independent type value sets perform basic checking but also check a value entered against the list of approved values you define. Dependent - A Dependent value set is associated with an Independent value set. Dependent value sets ensure that all dependent values are associated with a value in the related Independent value set. Table - Table value sets obtain their lists of approved values from existing application tables. When defining your table value set, you specify a SQL query to retrieve all the approved values from the table. Special - This specialized value set provides another flexfield as a value set for a single segment.
Types of Value Sets (continued) Pair - This specialized value set provides a range flexfield as a value set for a pair of segments. Translatable Independent - A Translatable Independent value set is similar to an Independent value set in that it provides a predefined list of values for a segment. However, a Translatable Independent value set can contain display values that are translated into different languages. Translatable Dependent - A Translatable Dependent value set is similar to a Dependent value set in that the available values in the list and the meaning of a given value depend on which independent value was selected in a prior segment of the flexfield structure. However, a Translatable Dependent value set can contain display values that are translated into different languages.
Validation Type None A validation of type None performs only minimal checking of the data input through this flexfield segment. Use the validation type None when the actual values to be input cannot be anticipated in advance but the data entered must conform to a particular data type, length, or any other formatting criteria. Examples of such values include credit card numbers, street addresses, and phone numbers.
Validation Type Independent Use the validation type Independent when you know the allowable values ahead of time. With an Independent validation type, you typically also define a list of the actual values that are approved for use. The user selects these values from a pop-up list. In the example in the slide, the Category value set contains the only three allowable values for the Category segment of a hypothetical Item Information flexfield. The category segment value must indicate a computer item, an appliance item, or an item of furniture.
Validation Type Dependent A Dependent value set is also associated with a list of approved values. In this case however, the values on the list can be grouped into subsets of values. Each subset of values is then associated with a value from an Independent value set. Once a value from the Independent value set has been specified, the list of values for the Dependent value set displays only the values that are approved for the value selected from the Independent value set. In the example in the slide, once a value from the Category value set has been specified, only the appropriate values from the Item value set are displayed. The segment or parameter using the dependent value set must appear after the segment or parameter using the independent value set.
Region
Western Eastern Eastern Southern Western
City
San Jose Boston Chicago Charleston Denver
San Jose
Denver
Validation Type Table If an application table already contains all the allowable values, you can define a table-validated value set to retrieve them from the table. You can specify selection criteria in the form of an SQL WHERE clause if you need to restrict the values for some reason. Table-validated value sets are very useful when the set of approved values is very large, changes frequently, and is maintained by the application.
Specialized Validation Types Two additional validation types are used for more specialized validation needs: Special value sets can accept an entire key flexfield as a segment value in a descriptive flexfield or report parameter. Pair value sets are a specialized form of Special value sets.
Gerate
Mobel
Appareils
Meubles
Kategorie Mobel
Categorie Meubles
Validation Type Translatable Independent Translatable Independent value sets are similar to Independent value sets except that translated values can be displayed to the user. Translatable Independent value sets enable you to use hidden values and displayed (translated) values in your value sets. In this way your users can see a value in their preferred languages, yet the values will be validated against a hidden value that is not translated. A Translatable Independent value set can have only Translatable Dependent value sets dependent on it.
Validation Type Translatable Dependent Translatable Dependent value sets are similar to Dependent value sets except that translated values can be displayed to the user. Translatable Dependent value sets enable you to use hidden values and displayed (translated) values in your value sets. In this way your users can see a value in their preferred languages, yet the values will be validated against a hidden value that is not translated. Translatable Dependent value sets must be dependent on a Translatable Independent value set.
Summary of Validation Types The chart in the slide shows a comparison of the various validation types. It also shows where the lists of acceptable values are stored.
Practice 2-1
Practice 2-1 Instructions 1 Briefly explain how a value set can control the values used in a flexfield segment. 2 Which validation type would be appropriate to use for the following data? Customer postal codes The ID numbers of your salespeople The weight of various standard inventory items Department number 3 Does a Dependent validation type provide a list of values to the user? What about a validation type of None? Practice 2-1 Solutions 1 Briefly explain how a value set can control the values used in a flexfield segment. A value set is a definition of the values that are acceptable for a flexfield segment. As such, it specifies the minimum requirements that data must meet. This includes data type, length, and other such attributes. Additionally, you can provide a value set with a list of approved values. In this case, only values from the approved list can be entered or displayed in the segment.
Copyright Oracle Corporation, 2000. All rights reserved.
2 Which validation type would be appropriate to use for the following data? Customer postal codes: None The ID numbers of your salespeople: Table The weight of various standard inventory items: None Department numbers: Table (Answers to the above questions may vary. There are several possible answers.) 3 Does a Dependent validation type provide a list of values to the user? What about a validation type of None? Yes, Dependent value sets consist of several groups of values with each group associated with a particular value from an Independent value set. No, value sets of type None perform minimal value checking. They do not have a list of approved values.
Planning Your Value Set There are three major areas you should consider when planning your value sets. Planning the value set attributes, including the value set name, description, and other attributes Planning the format validation to determine how all input must be formatted to be acceptable Planning the value validation, including specifying the validation type and any additional validation information, if required by the validation type
Value Set Level Attributes Value Set Name - If an Oracle applications predefined value set has the same name as a user-defined value set within the same application, the user-defined value set is overridden during an upgrade. Therefore, follow these naming guidelines: Do not use the patterns of either two or three characters followed immediately by a hyphen or an underscore. These patterns are reserved by Oracle Applications. Do not use spaces in your value set name. Include a custom or site prefix in the value set name to make it unique. Oracle always provides a list of reserved value set names before an upgrade. Be sure to check this list against your existing value sets. Description - You can give your value sets descriptive text information. Security - You can define security rules that further control the values available from this value set. Longlist Option - You can enable the user to interrupt the display of very long lists of values.
Planning Data Format Validation Format Type - Select the available data types from the list of values. Maximum Size - Specify the maximum size of the value. The maximum size must be less than or equal to the size of the underlying column in the base application. Precision - For numeric data, specify the number of decimal places. Numbers Only - Select Numbers Only to accept only digits. Uppercase Only - Select Uppercase Only to force any lowercase input to uppercase. Right-Justify and Zero-Fill - Select these options to shift number to the right and then pad from the left with zeros. This is an alternate format for alphanumeric numbers. Maximum/Minimum Value - To define a range of values for this value set, specify a beginning value and an ending value.
Type Char
Option Uppercase Only (AZ) Numbers Only (09) Right-Justify and Zero-Fill Numbers (09)
Precision
Formatting Types You can require one of several types of data formatting. When you declare a value set a particular format type, all data entered in the segment that uses this value set must match the requirements of the format. For some format types, there are additional options. The various format types and options are discussed on the following pages.
Char Char and and Number Number Format Format Editing Editing
Data Type Character Numbers Only Uppercase Only Right-Justify and Zero-Fill Numbers (Maximum Size = 4) Number Precision = 3 Example Input Abcd#78 909B Bac 909
Option
12345
12345.000
Char and Number Formatting Rules and Their Results You have several choices about the type of data you can allow in a value set and the editing that is done to that data. Two of the choices are shown in the slide. Char Format - Plain character format type accepts uppercase, lowercase, and special characters. Numbers Only - This format type allows only the digits 09 to be input into a field. You will receive an error message if you attempt to enter anything else. Uppercase Only - This format type converts any lowercase letters entered to uppercase. Right-Justify and Zero-Fill Numbers - Alphanumeric data is ordinarily leftjustified. This option enables you to right-justify numeric values and pad with zeros. Any number entered is converted to the full width of the field size. Precision - For data, this numeric format type enables you to specify the number of decimal positions available. If the data entered has more decimals than there are precision positions, the data will be rounded.
Time, Time, Standard Standard Date, Date, and and Standard Standard DateTime DateTime Format Format Editing Editing
Display Time Max Size = 5 Max Size = 8 Standard Date Standard DateTime HH24:MI HH24:MI:SS Users preferred date format Users preferred date/time format
Date and Time Format Results The Max Size attribute controls the display of the output for the Time format as shown in the slide. The Standard Date and Standard DateTime formats enforce the users preferred format. There are two additional format types: Date and DateTime. However, these exist for backward compatibility only. Any new value sets you create should use Standard Date and Standard DateTime.
Format Interaction
MACH
Display Size: 2
01 90 90
Considering the Interaction of Formatting When planning your value set, consider the interaction between the value set and the segment that will eventually use it. Optionally, try to keep identical the maximum size defined for the value set and the display size defined for the flexfield segment. Otherwise, the user may have to scroll to see the full value. This is especially important with values formatted with Right-Justify and ZeroFill.
Formatting Formatting Requirements Requirements for for Translatable Translatable Value Value Sets Sets
Translatable Translatable value value sets sets must must use use the the format format type type Char. Char. The The maximum maximum size size must must be be no no greater greater than than 150. 150. The The Numbers Numbers Only Only option option and and the the Right-Justify Right-Justify and and Zero-Fill Zero-Fill Numbers Numbers option option cannot cannot be be used used with with translatable translatable value value sets. sets.
Practice 2-2
Practice 2-2 Instructions Use the sample values given below to propose an applicable format type. There are several possible answers. 000123 01-JAN-1998 1.234 COM Practice 2-2 Solutions Use the sample values given below to propose an applicable format type. There are several possible answers. 000123: Character, Maximum Size 6, Right-justify and Zero-fill 01-JAN-1998: Standard Date 1.234: Numeric, Maximum Size 5, Precision 3 COM: Character, Uppercase Only
Table Table
Planning How to Validate Your Values Which type of validation you use depends on the variability of the data and how the list of acceptable values is processed.
Planning Planning Value Value Sets Sets and and Their Their Values Values
Category value set Category values Item value set Item values
755 COM 876 933 320 APPL 560 876 877 FURN 154 677
Copyright Oracle Corporation, 2000. All rights reserved.
Modem Monitor Printer Microwave Refrigerator Washer Desk Table Bunk Bed
Planning Your Values When Planning Value Sets For validation types that provide lists of values, plan the values they will process when you are planning the value set itself: Consider how the actual values should be formatted. For example, if the values are 01, 02, instead of 1,2, define the value set with Right-Justify Zero-Fill set to Yes. Consider the segment size and the display sizes you define. When using existing value sets, disable values that have become obsolete (values cannot be deleted), or change the description and reuse the value if possible. Using Range Features Group related values in ranges to simplify implementing range-based features such as cross-validation and security rules. Allow for future expansion by using large values. For example, use three digits instead of two for a segment.
Create Create your your dependent dependent value value set, set, specifying specifying a a default default value. value. Define Define your your independent independent values. values. Define Define your your dependent dependent values. values.
Planning Values for Dependent Value Sets Because the values for a dependent value set interact with the values from an independent value set, use the procedure outlined on the slide when planning your dependent value set. Notice that you must define a default value for each group of dependent values. Translatable dependent value sets behave like dependent value sets except that they must be dependent on a translatable independent value set. A translatable independent value set can have only translatable dependent value sets dependent on it.
Defining Your Value Sets The procedure for defining value sets is shown in the slide. You should always check the existing value sets to see if there is an existing value set that you can use.
Value Value Set Set Usage Usage by by Key Key Flexfields Flexfields
The The SQL*Plus SQL*Plus query query below below can can be be used used to to show show which which segments segments of of which which structures structures of of which which key key flexfields use different value sets. This report does flexfields use different value sets. This report does not not show show any any information information for for flexfields flexfields used used with with SRS. SRS.
Value Set Usage by Key Flexfields select flex_value_set_name "Value Set", descriptive_flexfield_name "Flexfield", descriptive_flex_context_code "Structure", end_user_column_name "Column" from apps.fnd_descr_flex_column_usages a, apps.fnd_flex_value_sets b where a.flex_value_set_id = b.flex_value_set_id and descriptive_flexfield_name not like '$SRS$%' order by flex_value_set_name, descriptive_flexfield_name, descriptive_flex_context_code;
Value Value Set Set Usage Usage by by Descriptive Descriptive Flexfields Flexfields
The The SQL*Plus SQL*Plus query query below below can can be be used used to to show show which which segments segments of of which which structures structures of of which which descriptive descriptive flexfields flexfields use use different different value value sets. sets. This This report does not show any information for report does not show any information for flexfields flexfields used used with with SRS. SRS.
Value Set Usage by Descriptive Flexfields col 'value set' for a40 col flexfield for a40 col structure for a30 col column for a32 select d.flex_value_set_name "Value Set", a.id_flex_name "Flexfield", e.id_flex_structure_name "Structure", c.segment_name "Segment" from apps.fnd_id_flexs a, apps.fnd_id_flex_structures b, apps.fnd_id_flex_segments c, apps.fnd_flex_value_sets d, apps.fnd_id_flex_structures_tl e where a.application_id = b.application_id and a.id_flex_code = b.id_flex_code and b.application_id = c.application_id and b.id_flex_code = c.id_flex_code and b.id_flex_num = c.id_flex_num
and c.flex_value_set_id = d.flex_value_set_id and c.application_id = e.application_id and c.id_flex_code = e.id_flex_code order by d.flex_value_set_name, a.id_flex_name, e.id_flex_structure_name;
Format Format Validation Validation options options Validation Validation Type Type
Click Click the the Edit Edit Information Information button button to to enter enter information information required for validation types Dependent, Translatable required for validation types Dependent, Translatable Dependent, Dependent, Table, Table, Special, Special, or or Pair. Pair.
(N) (N) Application>Validation>Set Application>Validation>Set
Defining Defining a a Dependent Dependent or or Translatable Translatable Dependent Dependent Value Value Set Set
Use Use the the Dependent Dependent Value Value Set Set Information Information window window to to enter: enter: Independent Independent Value Value Set Set Dependent Dependent Default Default Value Value
(N) (N) Application>Validation>Set Application>Validation>Set (B) (B) Edit Edit Information Information
Selecting Selecting a a Value Value Set Set for for Value Value Definition Definition
Use Use the the Find Find Value Value Set Set window window to to select select the the value value set set for for which which you you want want to to define define values values in in the the Segment Segment Values Values window. window.
Defining Defining Values Values for for a a Dependent Dependent or or Translatable Translatable Dependent Dependent Value Value Set Set
Use Use the the Find Find Value Value Set Set window window to to select select the the independent independent value value associated associated with with each each dependent dependent value value you you define. define.
Defining Defining Values Values for for a a Value Value Set Set
Use Use the the Values, Values, Effective Effective region region of of the the Segment Segment Values window to enter: Values window to enter: Value Value Translated Translated Value Value (translatable (translatable value value sets sets only) only)
Description Description Enabled Enabled From/To From/To effective effective dates dates
(N) (N) Application>Validation>Values>Find Application>Validation>Values>Find Value Value Set Set (B) (B) Find Find
Value Hierarchies
Value Hierarchies
Defining Defining Value Value Hierarchies Hierarchies and and Qualifiers Qualifiers
When When defining defining values values for for use use with with the the Accounting Accounting Flexfield, Flexfield, use use the the Values, Values, Hierarchy, Hierarchy, Qualifiers Qualifiers region region of of the the Segment Segment Values Values window window to to enter: enter: Parent Parent Group Group Level Level
Qualifiers Qualifiers Click Click the the Define Define Child Child Ranges, Ranges, Move Move Child Child Ranges, Ranges, and and View View Hierarchies Hierarchies buttons buttons to to enter enter and and view view additional additional information information about about value value hierarchies. hierarchies.
(N) (N) Application>Validation>Values>Find Application>Validation>Values>Find Value Value Set Set (B) (B) Find Find
Defining Value Hierarchies and Qualifiers Parent - Select this check box for parent values. Clear this check box for values that are not parents of any other value. Group - For parent values, select the rollup group to which you want to assign the value. Level - Enter a description of this values relative level in your hierarchy structure. This level description is for your purposes only. Qualifiers - Navigate to the Qualifiers field to display the Segment Qualifiers window and assign segment qualifiers to your values as appropriate. Examples of segment qualifiers for the Accounting Flexfield include: Allow Budgeting Allow Posting Account Type
Summary
Summary Summary
Value Value sets sets control control data data available available through through flexfields. flexfields. Value Value sets sets define define allowable allowable values. values. Different Different types types of of value value sets sets validate validate differently. differently. Value Value sets sets may may also also contain contain a a list list of of actual actual values. values.
Using Value Sets: Summary Use value sets to control the data entered and displayed through flexfield segments. A value set is a definition of allowable values. There are several types of value sets. Each type differs in the amount and type of validation processing it performs. Some types of value sets present the user with a list of actual values from which to choose. You can define this list yourself or retrieve it from an application table.
Objectives
Objectives Objectives
After After completing completing this this lesson, lesson, you you should should be be able able to to do the following: do the following: Explain Explain intelligent intelligent keys keys and and provide provide examples examples
Identify Identify key key flexfields flexfields that that are are required required by by Oracle Oracle Applications Applications Explain Explain the the purpose purpose of of flexfield flexfield qualifiers qualifiers and and optional optional key key flexfield flexfield features features Design Design a a key key flexfield flexfield structure structure Define Define the the key key flexfield flexfield structure structure and and segment segment attributes attributes Define Define flexfield flexfield qualifiers qualifiers and and segment segment qualifiers qualifiers Implement Implement optional optional features features as as needed needed
Lesson Topics At the end of this lesson, you should be able to: Explain intelligent keys and provide examples Identify key flexfields that are required by Oracle Applications Explain the purpose of flexfield qualifiers and optional key flexfield features Design a key flexfield structure Define the key flexfield structure and segment attributes Define flexfield qualifiers and segment qualifiers Implement optional features as needed
Overview
Overview Overview
Key Key flexfields flexfields as as intelligent intelligent keys keys Key Key flexfields flexfields use use of of code code combinations combinations Key Key flexfield flexfield qualifiers qualifiers Additional Additional key key flexfield flexfield options options Defining Defining a a key key flexfield flexfield structure structure Specifying Specifying flexfield flexfield qualifiers qualifiers and and segment segment qualifiers if needed qualifiers if needed Using Using optional optional key key flexfield flexfield features features
Lesson Overview Key flexfields create unique identifiers for use internally by Oracle Applications. The combinations of values for the segments of a key flexfield identify entities. These code combinations are used throughout Oracle Applications. Depending on which key flexfield you are defining, you might need to specify flexfield qualifiers and segment qualifiers. There are also several optional features of key flexfields you may wish to implement. Finally, this lesson covers the mechanics of the definition process.
Intelligent Keys
Asset number
Account number
Serial number
Job code
Building Intelligent Keys for Oracle Applications Intelligent keys are multipart key values in which each part of the key contains meaningful information. You use key flexfields to build the intelligent keys required by Oracle Applications. Because key flexfields are integrated with the internal processing of Oracle Applications, there are more requirements for the structure and content of key flexfields than was the case with descriptive flexfields.
Requirements for Key Flexfields Key flexfields have a dual purpose. They must collect information required by Oracle Applications and still allow for user customization. Provide Required Information Provide information needed for reports and processing. For some applications, particular items of information must be identified within the flexfield. For example, Oracle General Ledger requires the balancing segment of the Accounting Flexfield. Build unique IDs for use by the applications while giving users meaningful codes. Provide Customization Capability Tailor the flexfield to the companys business practice instead of changing the practice to fit the flexfield. Retain the information the company already keeps.
Accounting
Sales Tax Location Oracle Receivables Territory Oracle Service Oracle Service Item Grade Job Personal Analysis Position Soft Coded
Oracle Inventory
Account Aliases Item Catalogs Item Categories Sales Orders Stock Locators System Items
Key Flexfields Used by Oracle Applications The slide shows the key flexfields used by Oracle Applications. The number of key flexfields is significantly smaller than the number of descriptive flexfields.
Implementing Key Flexfields: Procedure The slide shows the steps involved in implementing a key flexfield. The first two steps are covered in this lesson. The remaining steps are covered in the remainder of the course.
_____Account Entry __
Corporation Subsidiary Division Department Account 10 203 3003 025 203
_____Account Entry __
Company Division Department Account 10 203 3003 025
Key Flexfield Structures Although it is possible for a key flexfield to use multiple structures, it is much less typical than with descriptive flexfields. Most key flexfields use only one structure. However, key flexfields still allow the user to control the structure of the flexfield. For example, the slide shows two different accounting flexfield structures defined by two different businesses. Each business defines an accounting flexfield that reflects its operating structure While in many cases the user has control over which descriptive flexfield structure is used, with key flexfields the application usually determines the correct structure with which to function. For example, Oracle General Ledger determines which accounting flexfield structure to use from the profile option Set of Books.
Code Combinations
_____Account Entry __
Corporation Subsidiary Division Department Account 10 203 3003 025 203
_____Account Entry __
Company Division Department Account 10 203 3003 025
10-203-3003-025-203
10-203-3003-025
Key Flexfield Code Combinations Key flexfields typically consist of several segments. The values provided by these segments make up the code combinations that function as intelligent keys for use by Oracle Applications.
Code Combinations Table SEGMENT1 10 SEGMENT2 203 SEGMENT3 3003 SEGMENT4 025
Storing Code Combinations Each flexfield stores its code combinations in a database table called a code combinations table. In the combinations table, there is one column for every key flexfield segment. These columns are usually named SEGMENTn, where n is a number. There is a set number of SEGMENT columns available for each key flexfield. You assign a key flexfield segment to a particular SEGMENT column when you define the key flexfield. Each row in the combinations table (that is, each unique combination of segment values) is identified by a unique ID value stored in a unique ID column. This column functions as the primary key for the combinations table. For key flexfields that have multiple structures, there is also a structure ID column.
Key Flexfield Application Tables This SQL*Plus query can be used to show Oracle Applications key flexfields and the tables in which they store their code combinations.
ID_FLEX_NAME --------------------------Accounting Flexfield Category Flexfield Asset Key Flexfield Location Flexfield Oracle Service Item Flexfield Territory Flexfield Sales Tax Location Flexfield Item Categories Account Aliases Item Catalogs Sales Orders System Items Stock Locators Grade Flexfield Job Flexfield Personal Analysis Flexfield Position Flexfield APPLICATION_TABLE_NAME ----------------------GL_CODE_COMBINATIONS FA_CATEGORIES_B FA_ASSET_KEYWORDS FA_LOCATIONS MTL_SYSTEM_ITEMS_B RA_TERRITORIES AR_LOCATION_COMBINATIONS MTL_CATEGORIES_B MTL_GENERIC_DISPOSITIONS MTL_ITEM_CATALOG_GROUPS MTL_SALES_ORDERS MTL_SYSTEM_ITEMS_B MTL_ITEM_LOCATIONS PER_GRADE_DEFINITIONS PER_JOB_DEFINITIONS PER_ANALYSIS_CRITERIA PER_POSITION_DEFINITIONS
Soft Coded KeyFlexfield Bank Details KeyFlexField Cost Allocation Flexfield People Group Flexfield
Business Y Corp Sub Div Dept Acct 10 203 3003 025 203 Balancing segment
Key Flexfield Qualifiers Both descriptive flexfields and key flexfields allow the user to design the flexfield structures and their segments. With descriptive flexfields, neither the information gathered nor the way the information is structured is used internally by Oracle Applications. Key flexfields, however, are different. Oracle Applications use certain pieces of information collected by some key flexfield segments internally. For example, Oracle General Ledger needs to know which segment in the Accounting flexfield to use for balancing operations. But since the location of the balancing segment in the accounting flexfield can be customized, the application must have a way of locating the segment it needs within any accounting flexfield structure. Being able to locate particular segments in a key flexfield structure is the purpose for qualifiers. A qualifier is a label attached to a particular key flexfield segment so it can be located by the application requiring its information.
Types of Qualifiers
(Balancing segment)
10
203
3003
025
(Allow posting)
Types of Key Flexfield Qualifiers Qualifiers allow the user to retain the ability to customize the structure of the flexfield while still allowing the Oracle Application to find the information it needs to process. There are two types of qualifiers: Flexfield qualifiers identify a segment in a flexfield. Segment qualifiers identify a value in a segment. The slide shows both types of qualifiers assign to an accounting flexfield combination.
Flexfield Qualifiers
Account segment
Flexfield Qualifiers Identify Key Flexfield Segments The flexfield asks each segment a yes/no question. Flexfield qualifiers may be unique, global, and required: Unique: Is this the segment that this flexfield can have only one of? Required: Is this the segment this flexfield must have to do its work? Global: Is this a segment? Global qualifiers exist as carriers for segment qualifiers. Assigning Flexfield Qualifiers to Segments Global qualifiers need not be assigned since they apply automatically to every segment in the flexfield. Assign flexfield qualifiers while defining segments.
Oracle Oracle Applications Applications Key Key Flexfields Flexfields Using Using Qualifiers Qualifiers
General General Ledger Ledger Oracle Oracle Assets Assets Oracle Oracle Human Human Resources Resources Oracle Oracle Payroll Payroll Oracle Oracle Accounts Accounts Receivable Receivable Accounting Accounting flexfield flexfield Location Location flexfield flexfield Asset Asset Category Category flexfield flexfield SoftCoded SoftCoded Key Key flexfield flexfield Cost Cost Allocation Allocation flexfield flexfield Sales Sales Territory Territory flexfield flexfield
Key Flexfields Using Qualifiers The slide shows the key flexfields that use qualifiers and the Oracle application that uses each key flexfield.
Segment Qualifiers
Account list
Identifying Values in Flexfield Segments with Segment Qualifiers A segment qualifier is similar to the segment asking each value the question, What type of value are you? For example, the account number 300 may be used within a company as a revenue account. Use the following segment qualifiers with the accounting flexfield: Allow Budgeting Allow Posting Account Type: Asset, Expense, Liability, Ownership/Stockholders Equity, or Revenue
Other Key Flexfield Features Some other capabilities of key flexfields are available for use. You should consider using these capabilities where appropriate: Dynamic insertion of new values Cross-validation of segment value combinations Security on values accessible Aliases to speed entry of frequently used value combinations
[]
(Foreign key)
Directly (from entry window) __ Part Number _________ Category Item Color COM 876 LTN Computer Monitor Light tan
Allowing Dynamic Insertion of New Code Combinations Key flexfield code combinations appear on many types of windows. Typically, Oracle Applications use a particular form (called a combination form) for directly entering the new code combinations. These same code combinations then be displayed by many other windows. On these related windows, however, the fields are typically read-only and not updateable. Therefore new code combinations cannot be entered from these forms. If you allow dynamic insertion, you can enter new code combinations from such display windows as well as from regular entry windows.
Cross-Validating Values
__ Asset Location _____________ Country State City UK CA Houston United Kingdom California
Validating the Combinations of Segment Values to Control Data Integrity For key flexfields with multiple segments, you can define rules to cross-check value combinations entered. In this way, you can prevent combinations of segment values that are illogical or that should not be allowed from being entered. The slide shows an illogical combination of values for the Asset key flexfield being disallowed.
COM
Description: Description: Item Number
Weight
Using Value Security You can specify who can use particular segment values by defining flexfield value security rules. For example, the slide shows a security rule disallowing use of the value COM from the Category value set. The unsecured Category value set allows used of this value. Define the rules for a particular value set and then associate the rule with the appropriate responsibility.
COM-876-LTN
Using Shorthand Aliases to Speed Data Entry Allow users to enter data faster and more easily with shorthand aliases. An alias is a label for a particular combination of key flexfield segment values. Give aliases to combinations that are entered frequently. Then just enter the alias into the flexfield to automatically populate the values for the segments.
Planning Decisions
Planning Decisions Application Question: Does the application support different segment structures? Related Question: How many structures are needed? Application Question: How many segment columns are available? Related Question: What segments are needed? Application Question: What flexfield qualifiers does this flexfield use or need? Related Question: Do segments correspond to each needed qualifier? Application Question: Are dynamic inserts feasible? Related Question: Who can create new combinations? Application Question: Should cross-validation be enabled? Related Question: Is protection from invalid combinations needed? Application Question: Should shorthand flexfield entry be enabled? Related Question: Are many combinations used repeatedly?
Application Question: Which value sets are available? Related Question: How should the segments be validated? Application Question: Which segments should use flexfield value security? Related Question: Are some segment values privileged or applicable only for some users?
Designing Designing the the Key Key Flexfield Flexfield Layout Layout
Title
Order of segments
Segment separator
Values
Designing Key Flexfield Layout Design the structures needed and the segments for each structure: Identify the structure titles. Plan the number and order of segments. Identify the segment separator. Determine the value sets and values to be used. Plan the window prompts.
Designing Segments
Designing Key Flexfield Segments Decide how each segment of the key flexfield should behave and what values to allow in each segment. Enabled or Displayed - Can users see this segment? Disabled segments are not displayed. If the segment does not display, use a default value to populate it. Required - Can users leave the segment without entering a value? Most key flexfield segments require a value. Validation - Most key flexfield segments provide a list of values. Use a predefined value set, or design a new one for this segment. Not using a value set is equivalent to using a validation type of None, character format, width same as underlying segment column, uppercase allowed, and no right justification or zero fill. Value Security - Should security rules for the value set apply to this segment? Related Segments - Link segments with ranges of Low and High to enforce a relationship between them.
Default Type Constant Current Date Current time Field Profile Segment SQL Statement
Default Value Any literal value Current time Current time or current date/time Default Value field value Value of profile in Default Value Value in prior segment Result of SQL query
Specifying Segment Defaults - Examples Default Type: Constant Default Value: The constant specified. Example: USA Result: USA Default Type: Current Date Default Value: The date at the time of entry. Example: Result: MAY 01, 2000 Default Type: Current Time Default Value: The Date/Time at the time of entry. Example: Result: 14:30:00 MAY 01, 2000 Default Type: Field Default Value: The value in the specified field. Use the format block:field Example: ORDER:LINE
Copyright Oracle Corporation, 2000. All rights reserved.
Result: 3 Default Type: Profile Default Value: The value of the specified profile option. Use the application name of the profile option. Example: GL_SET_OF_BOOKS_ID Result: 101 Default Type: Segment Default Value: The value returned by the specified previous segment. Example: Company Result: 01 Default Type: SQL Statement Default Value: The value returned by the specified SQL statement. The statement must return a single value. $PROFILES$ and $FLEX$ can be used in the statement. Example: SELECT NAME FROM EMP WHERE JOB=CEO Result: Jones
Planning Values for Use with Key Flexfields Plan the values for the independent and dependent value sets created for this key flexfield. Choose values logically and systematically. Grouping values together logically makes defining security and validation rules much easier. Oracle General Ledger Values Information Certain applications (especially Oracle General Ledger) require special handling of values: Oracle General Ledger applications require that segment qualifiers be assigned to some values used by the Accounting Flexfield. Oracle General Ledger applications can create hierarchies of values using rollup groups and parent-child relationships for processing and reporting. The Oracle General Ledger courses provide more details.
Definition Procedure
Defining Key Flexfields: Procedure Use the following procedure to define a key flexfield: Define new value sets if needed. Define key flexfield structure. Define the structure segments, including qualifiers. Freeze and compile the flexfield definition. Define value set values, including any qualifiers.
Accessing Accessing the the Key Key Flexfield Flexfield Definition Definition
Use Use the the Key Key Flexfield Flexfield Segments Segments window window to to find find the the flexfield flexfield definition definition you you want want to to modify. modify. Before Before you you can can modify modify the the definition, definition, you you must must unfreeze it. unfreeze it.
Segment Segment Separator Separator Cross-Validate Cross-Validate Segments Segments Freeze Freeze Rollup Rollup Groups Groups Allow Allow Dynamic Dynamic Inserts Inserts
Specifying the Key Flexfield Behavior Enabled - This enables shorthand entry of frequently used value combinations. Segment Separator - Specify a segment separator character. Segment separators are especially important for key flexfields since their values are often displayed concatenated. Cross-Validate Segments - This enables cross-checking of segment value combinations. Freeze Rollup Groups - Rollup groups are used by the Accounting flexfield. Allow Dynamic Inserts - This allows new key value combinations to be dynamically created and inserted into the table. When you have defined the flexfield level attributes, click the Segments button to continue defining individual segments for this structure.
Name Name Window Window Prompt Prompt Column Column Value Value Set Set Displayed Displayed Enabled Enabled
Defining Segment Attributes Use the Segments Summary window to define most of the segment attributes. Number - This specifies the sequence in which the fields will appear on the window. Name - The name by which this segment is know within Oracle Applications. Name the segment intuitively. Other segments may refer to this one for validation information. Also, the view generated uses the segment names for its column names. Window Prompt - The prompt that will appear on the window. The segment name is the default. Column - Specify the SEGMENT column in the underlying base table that contains this segments data. A pop-up list shows the SEGMENT columns that are still available for use. Displayed - If you choose to not display a segment, specify a default to populate it. Enabled - This flags the segment as available for use.
Defining Defining Validation Validation and and Size Size Attributes Attributes
Use Use the the Segments Segments window window to to enter enter options options for: for: Validation Validation
(N) (N) Application>Flexfield>Key>Segments Application>Flexfield>Key>Segments (B) (B) Segments Segments (B) (B) Open Open
Defining Validation and Size Attributes Validation Information Use the Validation block fields to specify value set information. Choose a predefined value set with a list of values or design one for this particular segment with the Value Sets window. Specify default information if you need to populate the segment with a default value. Determine whether security rules should apply to this value set for this segment. Size Specifications Display Size determines the field size on the flexfield. Specify a display size the same as the maximum segment size to avoid scrolling. Keep prompts small for neater reports. Click the Flexfield Qualifiers button to determine whether this flexfield has any qualifiers to be assigned.
(N) (N) Application>Flexfield>Key>Segments Application>Flexfield>Key>Segments (B) (B) Segments Segments (B) (B) Open Open (B) (B) Flexfield Flexfield Qualifiers Qualifiers
Freezing Freezing and and Compiling Compiling the the Definition Definition
Save Save after after freezing freezing to to automatically automatically compile compile the the flexfield flexfield definition. definition. Submit Submit the the request request to to build build the the structure structure view view by by freezing; submit the request to rebuild the flexfield freezing; submit the request to rebuild the flexfield view view by by closing closing the the window. window. Freeze Freeze and and compile compile after after making making any any changes changes to to the definition. Changes take place immediately. the definition. Changes take place immediately. You You see see your your changes changes immediately. immediately. Other Other users users must must exit exit the the system system or or change change responsibilities. responsibilities.
Defining Segment Qualifiers Specify additional qualifiers at the value level when appropriate. For example, Allow Budgeting is an Accounting Flexfield segment qualifier. Whenever possible do not change a value, change its description. If reuse is not possible, disable unused values, do not delete them.
(N) (N) Application>Validation>Values Application>Validation>Values (B) (B) Define Define Child Child Ranges Ranges (N) Application>Validation>Values (B) Move Child Ranges (N) Application>Validation>Values (B) Move Child Ranges (N) (N) Application>Validation>Values Application>Validation>Values (B) (B) View ViewHierarchies Hierarchies
Account Generator
Practice 3-1
Practice 3-1 Instructions Practice Notes Because many students access the system and create structures during this course, you need a way to distinguish between the structures created by you and by your classmates. Therefore, you will be assigned a number by your instructor. Use this number as a prefix wherever you see XX included in the name of something you are defining. In this way, you can ensure that the definitions you create are unique. Flexfield definitions can be created under many different responsibilities. However, the System Administrator responsibility has access to all functions needed to create the definitions in these practices. Scenario In this practice you will create a key flexfield structure and values for your chart of accounts. The design of the structure has already been determined. The flexfield will have four segments: a company segment, a cost center segment, an account segment, and a segment labeled Future for possible future expansion, in that order. Before you define that structure, you must first create the value sets the structure will use. Then you will create the structure, identifying the segments by their respective flexfield qualifiers. Finally, you will create the valid values for each segment. After creating the values, you will test your structure by performing the first steps in the process for creating a new set of books.
Copyright Oracle Corporation, 2000. All rights reserved.
Step 1: Define Value Sets Use the Value Sets window to define four value sets. Define an independent value set named XX_CO. Give the value set a description, a format type of Char, and a maximum size of 2. Enable security for the value set. Specify that the values should be right-justified and zero-filled. Define an independent value set named XX_COST. Give the value set a description, a format type of Char, and a maximum size of 3. Enable security for the value set. Specify that the values should be right-justified and zero-filled. Define an independent value set named XX_ACCOUNT. Give the value set a description, a format type of Char, and a maximum size of 4. Enable security and Longlist for the value set. Specify that the values should be right-justified and zero-filled. Define an independent value set named XX_FUTURE. Give the value set a description, a format type of Char, and a maximum size of 4. Enable security for the value set. Specify that the values should be right-justified and zero-filled. Step 2: Define the Structure (Segments) After defining your value sets, use the Key Flexfield Segments window to define a new flexfield structure for the Accounting Flexfield in the Oracle General Ledger application. Give your structure the code XX_COA, the title XX Chart of Accounts, a description, and the view name XX_AFF_VIEW. Enable the structure. Use a period (.) as the segment separator, specify that segments should be cross-validated, and allow dynamic inserts. Define four segments for your structure. Define a segment named CO, with a prompt of Company. Assign the segment the number 1, the column SEGMENT1, and the value set XX_CO. Ensure that the segment is displayed and enabled. Enable security for the segment. Give the segment a display size of 2 and a description size of 30. Enable the Balancing Segment flexfield qualifier for the segment. Define a segment named CC, with a prompt of Cost Center. Assign the segment the number 2, the column SEGMENT2, and the value set XX_COST. Ensure that the segment is displayed and enabled. Enable security for the segment. Give the segment a display size of 3 and a description size of 30. Enable the Cost Center Segment flexfield qualifier for the segment. Define a segment named ACCT, with a prompt of Account. Assign the segment the number 3, the column SEGMENT3, and the value set XX_ACCOUNT. Ensure that the segment is displayed and enabled. Enable security for the segment. Give the segment a display size of 4 and a description size of 30. Enable the Natural Account Segment flexfield qualifier for the segment.
Copyright Oracle Corporation, 2000. All rights reserved.
Define a segment named RFU, with a prompt of Future Use. Assign the segment the number 4, the column SEGMENT4, and the value set XX_FUTURE. Ensure that the segment is displayed and enabled. Specify a default type of Constant and a default value of 0000. Enable security for the segment. Give the segment a display size of 4 and a description size of 30. When you finish defining the structure, freeze and compile your flexfield definition. Step 3: Define Values After defining the value sets and segments for your flexfield, use the Segment Values window to define the values associated with each of the independent value sets. Define and enable the following values for the XX_CO value set. Value: 01 Description: Red Co. Value: 02 Description: Orange Co. Value: 03 Description: Yellow Co. Value: 04 Description: Green Co. Value: 05 Description: Blue Co. Define and enable the following values for the XX_COST value set. Value: 000 Description: Not Specified Value: 100 Description: Sales Value: 200 Description: Services Value: 300 Description: Development
Define and enable the following values for the XX_ACCOUNT value set. Specify the account type segment qualifier for each value as shown. Value: 1110 Description: Cash Account Type: Asset Value: 1120 Description: Cash Clearing Account Type: Asset Value: 2110 Description: Accounts Payable Account Type: Liability Value: 3110 Description: Salaries Account Type: Liability
Value: 4110 Description: Travel Expense Account Type: Expense Define and enable the following value for the XX_FUTURE value set. Value: 0000 Description: Not Specified Step 4: Test the Flexfield After defining your value sets, segments, and values, navigate to the Accounting Flexfield to test the results of your work. To view the Accounting Flexfield, you will perform the beginning steps in the process for creating a new set of books. However, you must not save your work, because you will not be completing the set of books definition. 1 In the General Ledger, Vision Operations (USA) responsibility, navigate to the Set of Books window. General Ledger, Vision Operations (USA): (N) Setup> Financials>Books>Define 2 Enter the name XX Set of Books. 3 Select your chart of accounts (the Accounting Flexfield structure you defined). 4 Navigate to the Budgetary Control region. 5 Navigate to the Reserve for Encumbrance field and display the list of values. The Accounting Flexfield appears.
Copyright Oracle Corporation, 2000. All rights reserved.
6 Enter values in the Accounting Flexfield to test your work. 7 Cancel your entries and exit without saving. Practice 3-1 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_CO Description: XX Company Value Set Security Available: Selected Format Type: Char Maximum Size: 2 Right-justify and Zero-fill Numbers: Selected Validation Type: Independent 3 Save your work. 4 Enter the information for the second value set in the following fields: Value Set Name: XX_COST Description: XX Cost Center Value Set Security Available: Selected Format Type: Char Maximum Size: 3 Right-justify and Zero-fill Numbers: Selected Validation Type: Independent 5 Save your work. 6 Enter the information for the third value set in the following fields: Value Set Name: XX_ACCOUNT Description: XX Account Value Set Security Available: Selected Enable Longlist: Selected Format Type: Char Maximum Size: 4 Right-justify and Zero-fill Numbers: Selected Validation Type: Independent 7 Save your work. 8 Enter the information for the fourth value set in the following fields: Value Set Name: XX_Future Description: XX Reserved for Future Use Value Set
Security Available: Selected Format Type: Char Maximum Size: 4 Right-justify and Zero-fill Numbers: Selected Validation Type: Independent 9 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Key Flexfield Segments window. System Administrator: (N) Application>Flexfield>Key> Segments 2 Query the application Oracle General Ledger and the flexfield title Accounting Flexfield. 3 In the Structures region, enter the information for the flexfield structure in the following fields: Code: XX_COA Title: XX Chart of Accounts Description: XX Chart of Accounts View Name: XX_AFF_VIEW Enabled: Selected Segment Separator: Period (.) Cross-Validate Segments: Selected Allow Dynamic Inserts: Selected 4 Click the Segments button to navigate to the Segments Summary window. 5 Enter the information for the first segment in the following fields: Number: 1 Name: CO Window Prompt: Company Column: SEGMENT1 Value Set: XX_CO Displayed: Selected Enabled: Selected 6 Click the Open button to navigate to the Segments window. 7 Enter the information for the first segment in the following fields: Security Enabled: Selected Display Size: 2 Description Size: 30 8 Save your work.
9 Click the Flexfield Qualifiers button to navigate to the Flexfield Qualifiers window. 10 Select the Enabled check box for the Balancing Segment flexfield qualifier. 11 Save your work. 12 Navigate back to the Segments Summary window. 13 Enter the information for the second segment in the following fields: Number: 2 Name: CC Window Prompt: Cost Center Column: SEGMENT2 Value Set: XX_COST Displayed: Selected Enabled: Selected 14 Click the Open button to navigate to the Segments window. 15 Enter the information for the second segment in the following fields: Security Enabled: Selected Display Size: 3 Description Size: 30 16 Save your work. 17 Click the Flexfield Qualifiers button to navigate to the Flexfield Qualifiers window. 18 Select the Enabled check box for the Cost Center Segment flexfield qualifier. 19 Save your work. 20 Navigate back to the Segments Summary window. 21 Enter the information for the third segment in the following fields: Number: 3 Name: ACCT Window Prompt: Account Column: SEGMENT3 Value Set: XX_ACCOUNT Displayed: Selected Enabled: Selected 22 Click the Open button to navigate to the Segments window. 23 Enter the information for the third segment in the following fields: Security Enabled: Selected Display Size: 4 Description Size: 30
24 Save your work. 25 Click the Flexfield Qualifiers button to navigate to the Flexfield Qualifiers window. 26 Select the Enabled check box for the Natural Account Segment flexfield qualifier. 27 Save your work. 28 Navigate back to the Segments Summary window. 29 Enter the information for the fourth segment in the following fields: Number: 4 Name: RFU Window Prompt: Future Use Column: SEGMENT4 Value Set: XX_FUTURE Displayed: Selected Enabled: Selected 30 Click the Open button to navigate to the Segments window. 31 Enter the information for the fourth segment in the following fields: Default Type: Constant Default Value: 0000 Security Enabled: Selected Display Size: 4 Description Size: 30 32 Save your work. 33 Navigate back to the Key Flexfield Segments window. 34 Select the Freeze Flexfield Definition check box. 35 Click the Compile button to compile the flexfield definition. Step 3: Define Values 1 Navigate to the Segment Values window. System Administrator: (N) Application>Validation>Values 2 In the Find window, select Value Set and find the XX_CO value set. 3 In the Values, Effective region of the Segment Values window, define the following values: Value: 01 Description: Red Co. Enabled: Selected Value: 02 Description: Orange Co. Enabled: Selected
Copyright Oracle Corporation, 2000. All rights reserved.
Value: 03 Description: Yellow Co. Enabled: Selected Value: 04 Description: Green Co. Enabled: Selected Value: 05 Description: Blue Co. Enabled: Selected 4 Save your work. 5 In the Segment Values window, select Value Set and find the XX_COST value set. 6 In the Values, Effective region, define the following values: Value: 000 Description: Not Specified Enabled: Selected Value: 100 Description: Sales Enabled: Selected Value: 200 Description: Services Enabled: Selected Value: 300 Description: Development Enabled: Selected 7 Save your work. 8 In the Segment Values window, select Value Set and find the XX_ACCOUNT value set. 9 In the Values, Effective region, define the following values: Value: 1110 Description: Cash Enabled: Selected
Value: 1120 Description: Cash Clearing Enabled: Selected Value: 2110 Description: Accounts Payable Enabled: Selected Value: 3110 Description: Salaries Enabled: Selected Value: 4110 Description: Travel Expense Enabled: Selected 10 In the Values, Hierarchy, Qualifiers region, define the following value attributes: Value: 1110 Account Type: Asset Value: 1120 Account Type: Asset Value: 2110 Account Type: Liability Value: 3110 Account Type: Liability Value: 4110 Account Type: Expense Note: Click in the Qualifiers field in the Values, Hierarchy, Qualifiers region to display the Segment Qualifiers window and enter a value in the Account Type field. Accept the default values for the other fields in the Segment Qualifiers window. 11 Save your work. 12 In the Segment Values window, select Value Set and find the XX_FUTURE value set. 13 In the Values, Effective region, define the following value:
Value: 0000 Description: Not Specified Enabled: Selected 14 Save your work. Step 4: Test the Flexfield After defining your value sets, segments, and values, navigate to the Accounting Flexfield to test the results of your work. To view the Accounting Flexfield, you will perform the beginning steps in the process for creating a new set of books. However, you must not save your work, because you will not be completing the set of books definition. 1 In the General Ledger, Vision Operations (USA) responsibility, navigate to the Set of Books window. General Ledger, Vision Operations (USA): (N) Setup> Financials>Books>Define 2 Enter the name XX Set of Books. 3 Select your chart of accounts (the Accounting Flexfield structure you defined). 4 Navigate to the Budgetary Control region. 5 Navigate to the Reserve for Encumbrance field and display the list of values. The Accounting Flexfield appears. 6 Enter values in the Accounting Flexfield to test your work. 7 Cancel your entries and exit without saving.
Practice 3-2
Practice 3-2 Instructions Scenario In this practice, you will create a key flexfield with a dependent segment. Although you would not normally use a dependent segment in the Accounting Flexfield, this practice will illustrate how to use dependencies in key flexfields, a procedure similar to the use of dependencies in descriptive flexfields. Dependent segments can be used in many key flexfields, such as System Items or Item Categories. You will create another key flexfield structure for your chart of accounts. The design of this structure has also already been determined. The flexfield will have four segments: a company segment, an account segment, a subaccount segment, and a segment labeled Future for possible future expansion, in that order. The following flexfield qualifiers will be associated with this structure: The company segment will be the Balancing segment. The account segment will be the Natural Account segment. Cost Center is not a required flexfield qualifier, so you will not use that qualifier here. Step 1: Define Value Sets Use the Value Sets window to define two value sets. Define an independent value set named XX_ACCT. Give the value set a description, a format type of Char, and a maximum size of 4. Enable
Copyright Oracle Corporation, 2000. All rights reserved.
security for the value set. Specify that the values should be right-justified and zero-filled. Define a dependent value set named XX_SUB. Give the value set a description, a format type of Char, and a maximum size of 2. Enable security for the value set. Specify that the values should be right-justified and zero-filled. Associate the dependent value set with the independent value set XX_ACCT. Assign the dependent value set a dependent default value of XX, and give the default value a description. In addition to these two value sets, you will use two of the value sets you created previously, XX_CO and XX_FUTURE. You do not need to redefine these value sets. Step 2: Define the Structure (Segments) After defining your value sets, use the Key Flexfield Segments window to define another new flexfield structure for the Accounting Flexfield in the Oracle General Ledger application. Give your structure the code XX_COA2, the title XX Chart of Accounts 2, a description, and the view name XX_AFF_VIEW_2. Enable the structure. Use a period (.) as the segment separator, specify that segments should be cross-validated, and allow dynamic inserts. Define four segments for your structure. Define a segment named CO, with a prompt of Company. Assign the segment the number 1, the column SEGMENT1, and the value set XX_CO. Ensure that the segment is displayed and enabled. Enable security for the segment. Give the segment a display size of 2 and a description size of 30. Enable the Balancing Segment flexfield qualifier for the segment. Define a segment named ACCT, with a prompt of Account. Assign the segment the number 2, the column SEGMENT2, and the value set XX_ACCT. Ensure that the segment is displayed and enabled. Enable security for the segment. Give the segment a display size of 4 and a description size of 30. Enable the Natural Account Segment flexfield qualifier for the segment. Define a segment named SUB, with a prompt of Subaccount. Assign the segment the number 3, the column SEGMENT3, and the value set XX_SUB. Ensure that the segment is displayed and enabled. Enable security for the segment. Give the segment a display size of 2 and a description size of 30. Define a segment named RFU, with a prompt of Future Use. Assign the segment the number 4, the column SEGMENT4, and the value set XX_FUTURE. Ensure that the segment is displayed and enabled. Specify a default type of Constant and a default value of 0000. Enable security for the segment. Give the segment a display size of 4 and a description size of 30. When you finish defining the structure, freeze and compile your flexfield definition.
Copyright Oracle Corporation, 2000. All rights reserved.
Step 3: Define Values After defining the value sets and segments for your flexfield, use the Segment Values window to define the values associated with the independent and dependent value sets. Define and enable the following values for the XX_ACCT value set. Specify the account type segment qualifier for each value as shown. Value: 0000 Description: Not Specified Account Type: Expense Value: 1500 Description: Western Region Account Type: Expense Value: 2500 Description: Eastern Region Account Type: Expense Define and enable the following values in the XX_SUB value set for the independent value 1500 (Western Region). Value: 55 Description: Car expense Value: 67 Description: Food expense Value: 99 Description: Entertainment Define and enable the following values in the XX_SUB value set for the independent value 2500 (Eastern Region). Value: 55 Description: Car expense Value: 87 Description: Hotel expense Value: 89 Description: Training materials After defining your value sets, segments, and values, navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1.
Practice 3-2 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_ACCT Description: XX Account Value Set 2 Security Available: Selected Format Type: Char Maximum Size: 4 Right-justify and Zero-fill Numbers: Selected Validation Type: Independent 3 Save your work. 4 Enter the information for the second value set in the following fields: Value Set Name: XX_SUB Description: XX Subaccount Value Set Security Available: Selected Format Type: Char Maximum Size: 2 Right-justify and Zero-fill Numbers: Selected Validation Type: Dependent 5 Click the Edit Information button to navigate to the Dependent Value Set Information window. 6 In the Independent Value Set region, enter XX_ACCT in the Name field. 7 In the Dependent Default Value region, enter XX in the Value field and XX Subaccount Default in the Description field. 8 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Key Flexfield Segments window. System Administrator: (N) Application>Flexfield>Key> Segments 2 Query the application Oracle General Ledger and the flexfield title Accounting Flexfield. 3 In the Structures region, enter the information for the flexfield structure in the following fields: Code: XX_COA2 Title: XX Chart of Accounts 2 Description: XX Chart of Accounts 2 View Name: XX_AFF_VIEW_2
Copyright Oracle Corporation, 2000. All rights reserved.
4 5
6 7
8 9 10 11 12 13
14 15
Enabled: Selected Segment Separator: Period (.) Cross-Validate Segments: Selected Allow Dynamic Inserts: Selected Click the Segments button to navigate to the Segments Summary window. Enter the information for the first segment in the following fields: Number: 1 Name: CO Window Prompt: Company Column: SEGMENT1 Value Set: XX_CO Displayed: Selected Enabled: Selected Click the Open button to navigate to the Segments window. Enter the information for the first segment in the following fields: Security Enabled: Selected Display Size: 2 Description Size: 30 Save your work. Click the Flexfield Qualifiers button to navigate to the Flexfield Qualifiers window. Select the Enabled check box for the Balancing Segment flexfield qualifier. Save your work. Navigate back to the Segments Summary window. Enter the information for the second segment in the following fields: Number: 2 Name: ACCT Window Prompt: Account Column: SEGMENT2 Value Set: XX_ACCT Displayed: Selected Enabled: Selected Click the Open button to navigate to the Segments window. Enter the information for the second segment in the following fields: Security Enabled: Selected Display Size: 4 Description Size: 30
Copyright Oracle Corporation, 2000. All rights reserved.
16 Save your work. 17 Click the Flexfield Qualifiers button to navigate to the Flexfield Qualifiers window. 18 Select the Enabled check box for the Natural Account Segment flexfield qualifier. 19 Save your work. 20 Navigate back to the Segments Summary window. 21 Enter the information for the third segment in the following fields: Number: 3 Name: SUB Window Prompt: Subaccount Column: SEGMENT3 Value Set: XX_SUB Displayed: Selected Enabled: Selected 22 Click the Open button to navigate to the Segments window. 23 Enter the information for the third segment in the following fields: Security Enabled: Selected Display Size: 2 Description Size: 30 24 Save your work. 25 Navigate back to the Segments Summary window. 26 Enter the information for the fourth segment in the following fields: Number: 4 Name: RFU Window Prompt: Future Use Column: SEGMENT4 Value Set: XX_FUTURE Displayed: Selected Enabled: Selected 27 Click the Open button to navigate to the Segments window. 28 Enter the information for the fourth segment in the following fields: Default Type: Constant Default Value: 0000 Security Enabled: Selected Display Size: 4 Description Size: 30 29 Save your work. 30 Navigate back to the Key Flexfield Segments window.
Copyright Oracle Corporation, 2000. All rights reserved.
31 Select the Freeze Flexfield Definition check box. 32 Click the Compile button to compile the flexfield definition. Step 3: Define Values 1 Navigate to the Segment Values window. System Administrator: (N) Application>Validation>Values 2 In the Find window, select Value Set and find the XX_ACCT value set. 3 In the Values, Effective region of the Segment Values window, define the following values: Value: 0000 Description: Not Specified Enabled: Selected Value: 1500 Description: Western Region Enabled: Selected Value: 2500 Description: Eastern Region Enabled: Selected 4 In the Values, Hierarchy, Qualifiers region, define the following value attributes: Value: 0000 Account Type: Expense Value: 1500 Account Type: Expense Value: 2500 Account Type: Expense Note: Click in the Qualifiers field in the Values, Hierarchy, Qualifiers region to display the Segment Qualifiers window and enter a value in the Account Type field. Accept the default values for the other fields in the Segment Qualifiers window. 5 Save your work. 6 In the Segment Values window, select Value Set and find the XX_SUB value set and the independent value 1500 (Western Region). 7 In the Values, Effective region, define the following values: Value: 55 Description: Car expense
Copyright Oracle Corporation, 2000. All rights reserved.
Enabled: Selected Value: 67 Description: Food expense Enabled: Selected Value: 99 Description: Entertainment Enabled: Selected 8 Save your work. 9 In the Segment Values window, select Value Set and find the XX_SUB value set and the independent value 2500 (Eastern Region). 10 In the Values, Effective region, define the following values: Value: 55 Description: Car expense Enabled: Selected Value: 87 Description: Hotel expense Enabled: Selected Value: 89 Description: Training materials Enabled: Selected 11 Save your work. After defining your value sets, segments, and values, navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1.
Summary Key flexfields are used to build identifiers required by Oracle Applications. Key flexfields allow the user to provide information needed by Oracle Applications while still structuring that information to reflect a particular business environment. The procedure for defining a key flexfield is similar to that for defining a descriptive flexfield. However, there are additional attributes for key flexfields that may also need to be defined. Additionally, key flexfields have several optional features that should be implemented where appropriate. The additional requirements and options for key flexfields include: By using qualifiers in key flexfields you can require that certain segments and certain values be identified for processing. You can allow security checking and integrity checking. You can define aliases to speed data entry. You can enter key flexfield value combinations from different windows, if allowed.
Objectives
Objectives Objectives
After After completing completing this this lesson, lesson, you you should should be be able able to to do do the the following: following: Explain Explain the the purpose purpose for for cross-validation cross-validation
Define Define cross-validation cross-validation rules rules Control Control the the interaction interaction of of multiple multiple cross-validation cross-validation rules. rules.
Lesson Objectives At the end of this lesson, you should be able to: Explain the use of cross-validation to ensure data coherence Plan cross-validation rules for a key flexfield Implement cross-validation rules Review and control the interaction of cross-validation rules
Objectives
Objectives Objectives
Identify Identify candidates candidates for for shorthand shorthand entry entry Plan Plan useful useful aliases aliases Enable Enable shorthand shorthand entry entry Define Define a a shorthand shorthand alias alias
Lesson Objectives (continued) Identify candidates for shorthand entry Plan useful aliases Enable shorthand entry Define a shorthand alias
Objectives
Objectives Objectives
Explain Explain how how flexfield flexfield security security is is accomplished accomplished Identify Identify which which flexfields flexfields are are candidates candidates for for security security Design Design a a security security plan plan Control Control interactions interactions between between security security rules rules Define Define security security rules rules Assign Assign security security rules rules Enable Enable security security
Lesson Objectives (continued) Explain how flexfield security is accomplished Identify which flexfields are candidates for security Design a security plan Control interactions between security rules Define security rules Assign security rules Enable security
Overview
Overview Overview
Designing Designing cross-validation cross-validation rules rules Defining Defining and and enabling enabling cross-validation cross-validation checking checking Identifying Identifying candidates candidates for for aliases aliases Defining Defining and and enabling enabling shorthand shorthand entry entry Using Using flexfield flexfield security security Planning Planning security security rules rules Implementing Implementing security security
Overview Additional flexfield options include: Cross-validation (key flexfields only) - Cross-validation rules let you control the combination of values entered for a key flexfield. Shorthand aliases (key flexfields only) - Shorthand aliases let you label certain groupings of values for a multi-segment flexfield. Whenever you need one of these groupings of values, you can use the alias for that grouping to enter the entire group. Security rules (key and descriptive flexfields) - Security rules let you control flexfield access to data. You create and tie security rules to a value set to specify which entries in a list of values are available to a user of a specific responsibility. This allows you to control that users access to data. You create security rules by defining inclusion or exclusion statements. You combine these statements to create a security rule. You must carefully consider the interaction of multiple rules when planning your security.
Cross-Validating Values
__ Asset Location _____________ Country State City UK CA Houston United Kingdom California
Using Cross-Validation to Enforce Data Integrity You can create rules specifying the allowable value combinations for multiple segment key flexfields. In this way you can avoid the generation of illogical or inappropriate key values. Cross-validation rules apply only to key flexfields. The slide shows an Asset Location flexfield with three fields for country, state, and city information. Since Asset Location is a key flexfield, you could define a cross-validation rule to be sure that no one tried to specify a US state value for the UK. Note that you could also specify cross-validation rules to ensure that each city value was placed in the correct state.
Type
From:
To:
INCLUDE EXCLUDE
value1.value2.value3 value1.value2.value3
value4.value5.value6 value4.value5.value6
Designing Rule Elements Cross-validation rules consist of an Include element that includes all possible combinations, and one or more Exclude elements that restrict various segment value combinations. To make maintenance easier, use many simple rules rather than a few complex rules. To pass validation, a value combination must be included and not be excluded by any of the Exclude elements. Rules are not retroactive, they apply only to segment value combinations entered after they are defined and enabled.
Data Data Type Type Specifications Specifications and and Cross-Validation Cross-Validation Rules Rules
Account Value Set Format Type: Char Upper case Only (A-Z)
Cross-Validation Rule
INCLUDE 00.000.0000.0000 TO ZZ.ZZZ.ZZZZ.ZZZZ EXCLUDE 00.000.2000.0000 TO ZZ.ZZZ.2999.ZZZZ
Specifying Data Type and Format in Cross-Validation Rules Cross-validation rules recognize any value characteristics specified for the value sets the segments use, such as Format Type, Right-Justify and Zero-Fill, Numbers Only, and Uppercase Only. Note that the Accounting flexfield does not use NULL values. The Cross-Validation Rules window enforces the correct collating order for the platform. For most platforms (ASCII) 0 < 000 < Z < ZZZ For some platforms (EBCDIC) A < AAA < 9 < 999
Description Description Error Error Message Message Error Error Segment Segment Cross-Validation Cross-Validation Rule Rule Elements Elements
(N) (N) Application>Flexfield>Key>CrossValidation Application>Flexfield>Key>CrossValidation Because Because cross-validation cross-validation rules rules can can be be defined definedfrom from within within multiple multiple applications, applications, the the path path to to the the Cross-Validation Cross-Validation Rules Rules window windowdepends depends on on which whichapplication application you you are are using. using.
Defining Cross-Validation Rules and Error Messages Define an Error Message and an Error Segment - Enter a rule name and description for each cross-validation rule. Specify the error message to display and the segment where the cursor should move when a user enters an invalid combination. Use the segment where the error probably occurred. Enter optional start and end dates for your rule. You can also use these fields to disable a rule. Specify at Least One INCLUDE Element - Unspecified values are always excluded, so every rule needs at least one Include statement. Otherwise no combinations will ever pass validation. As shown in the example, you can use the pop-up window to define which combinations to exclude. Exclude statements override Include statements. There can be multiple statements and each statement can specify values for multiple flexfield segments. Change the Flexfield Definition - You must exit and sign on again or change responsibilities to see any changes.
Cross-Validation Reports
Maintaining Cross-Validation Rules To minimize maintenance, plan cross-validation rules when first setting up the key flexfield. If later changes are necessary, review existing rules to ensure accurate and consistent validation. Disable previously existing combinations that are no longer valid according to the new rules. Using Reports to Maintain Cross-Validation Rules The Cross-Validation Rule Violation Report offers a listing of all the previously created flexfield combinations that violate the cross-validation rules for a given structure. The report program can also disable the existing combinations that violate the new rules. The Cross-Validation Rules Listing report lists all the cross-validation rules that exist for a particular flexfield structure.
Comparing Comparing Cross-Validation Cross-Validation and and Security Security Rules Rules
Cross-Validation Applies to all users. Value Security Applies only to users of the chosen responsibility. Affects key and descriptive flexfields as well as report parameters. Applies only to the value set used.
Affects only key flexfields. Applies across an entire key flexfield structure.
Interaction of Cross-Validation and Value Security Rules Both cross-validation and value security control the data that a user can enter. The slide shows a comparison of the scope and action of each. Cross-Validation Applies to all users regardless of responsibility Affects only key flexfields Applies across an entire key flexfield structure Value Security Rules Apply only to users of the chosen responsibility Can affect key and descriptive flexfields as well as program parameters Apply only to the value set used by a flexfield segment or program parameter
Practice 4-1
Practice 4-1 Instructions Scenario Cross-validation rules enable you to restrict users from entering certain account numbers, or combinations of segment value codes. In this practice, you will use the Accounting Flexfield structure you defined in Practice 3-1. You will create a cross-validation rule to prevent the Orange company from using the Development cost center. Because cross-validation rules apply to all users, when you test your flexfield you will not be able to enter the combination of company and cost center excluded in the rule. Instead, the error message defined for the rule will appear, and the cursor will return to the segment specified as the error segment. Whenever you add or change cross-validation rules, you must recompile the flexfield structure to ensure that your changes are reflected in the applications. Define a Cross-Validation Rule Use the Cross-Validation Rules window to define a cross-validation rule for the Accounting Flexfield structure you defined in Practice 3-1, XX Chart of Accounts. Name the rule XX_CVR:01, give the rule a description, and ensure that the rule is enabled. Enter an error message to explain the rule to users, and specify the CO segment as the error segment. Define two cross-validation rule elements. Define the first cross-validation rule element to include all the possible code combinations, from lowest to highest.
Copyright Oracle Corporation, 2000. All rights reserved.
Define the second cross-validation rule element to exclude any code combinations that contain both the Orange company and the Development cost center. After defining the cross-validation rule, recompile the flexfield structure definition. Navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1. Practice 4-1 Solutions Define a Cross-Validation Rule 1 Navigate to the Cross-Validation Rules window. System Administrator: (N) Application>Flexfield>Key> CrossValidation 2 Query the XX Chart of Accounts structure for the Accounting Flexfield in the Oracle General Ledger application. 3 In the Cross-Validation Rules region, enter the information for the rule in the following fields: Name: XX_CVR:01 Description: XX Cross-Validation Rule 01 Enabled: Selected Error Message: The Orange company cannot use the Development cost center. Error Segment: CO 4 In the Cross-Validation Rule Elements region, enter the information for the first rule element in the following fields: Type: Include From: 00.000.0000.0000 To: zz.zzz.zzzz.zzzz 5 In the Cross-Validation Rule Elements region, enter the information for the second rule element in the following fields: Type: Exclude From: 02.300.0000.0000 To: 02.300.zzzz.zzzz 6 Save your work. 7 Navigate to the Key Flexfield Segments window. System Administrator: (N) Application>Flexfield>Key> Segments 8 Query the XX Chart of Accounts structure for the Accounting Flexfield in the Oracle General Ledger application. 9 Click the Compile button to compile the flexfield definition. Navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1.
Copyright Oracle Corporation, 2000. All rights reserved.
5.
Using Shorthand Aliases to Speed Data Entry Whenever you notice that you are frequently entering the same combination of values into a multi-segment flexfield, you should consider defining an alias for that value combination. You can then use the alias to generate the complete set of values for the flexfield. Select an alias from a pop-up list of possible aliases for the flexfield. You can also enter the alias name directly in the alias window. Entering a shorthand alias automatically inserts the values for that alias into the key flexfield.
Using Using Full Full and and Partial Partial Aliases Aliases
Flexfield definition: Country State City Full aliases (value for every segment) USA NY New York USA CA San Francisco USA NY New York USA CA San Francisco
Using Full and Partial Aliases An alias can represent a complete flexfield combination or a set of partial segment values: If most combinations vary only in a single segment, create an alias with that segment blank and values specified for the remaining segments. If the alias represents a complete combination, once the alias name has been selected or entered, the shorthand window closes and the cursor moves to the next field. If the alias represents a partial flexfield value, the full flexfield window pops up with the cursor on the first empty segment. Pressing [Return] in a blank shorthand entry window also pops up the full flexfield window. Users can override values generated by aliases as appropriate.
Typical Typical Key Key Flexfields Flexfields Using Using Aliases Aliases
Typical Key Flexfields Using Aliases Because aliases are used to speed up the entry of often-used value combinations, certain key flexfields in Oracle Applications are especially suited for alias entry.
Defining an Alias
Max Max Alias Alias Size Size Prompt Prompt Alias Alias Template Template
Alias Alias Description Description Define Define multiple multiple aliases aliases for for the the same same flexfield flexfield if if necessary. necessary.
Refreeze Refreeze the the definition definition Compile Compile the the definition definition
Flexfields: Flexfields: Shorthand Shorthand Entry Entry Profile Profile Option Option
Query _ _ X _ X Add _ X X X X Update _ _ _
Not Enabled New Entries Only Query and New Entry All Entries Always
X X
Flexfields: Shorthand Entry Values The Flexfields: Shorthand Entry profile option controls the behavior of aliases at the user level. The user has the ability to update this option as appropriate.
Flexfields: Flexfields: Show Show Full Full Value Value Profile Profile Option Option
If alias specifies values for all segments, No Yes Does not display full flexfield Displays full flexfield with cursor in last segment
Flexfields: Show Full Value Profile Option The Flexfields: Show Full Value Profile Option allows the user to turn off the full display of a key flexfield whenever the user specifies an alias with values for all segments of the flexfield.
Adding Adding a a new new segment segment Disabling Disabling a a segment segment Changing Changing a a segment segment length length
Modifying Alias Definitions Since aliases are tied to the structure of the flexfield, any change to the flexfield structure must be reflected in any aliases providing values for that flexfield. Some of the typical modifications that also require changes to aliases are shown in the slide.
Practice 4-2
Practice 4-2 Instructions Scenario Shorthand aliases speed data entry for end users. Aliases can be used either to define a complete key flexfield combination or to create a template that provides values only for some segments, letting users complete the flexfield entry. Users can determine whether to use aliases in the Flexfields: Shorthand Entry user profile option. In this practice, you will define both a complete shorthand alias and a partial alias template for the Accounting Flexfield structure you defined in Practice 3-1. Define Shorthand Aliases Use the Shorthand Aliases window to define shorthand aliases for the Accounting Flexfield structure, XX Chart of Accounts, that you defined in Practice 3-1. Enable aliases for this structure, specify a maximum size of 15, and specify a prompt of Shorthand. Define two shorthand aliases. Define an alias named XX_SA_1, give the alias a description, and specify the complete combination 03.100.1110.0000. Define an alias named XX_SA_2, give the alias a description, and specify the partial combination 04...0000.
After defining your aliases, recompile the flexfield structure definition. Navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1. Practice 4-2 Solutions Define Shorthand Aliases 1 Navigate to the Shorthand Aliases window. System Administrator: (N) Application>Flexfield>Key> Aliases 2 Query the XX Chart of Accounts structure for the Accounting Flexfield in the Oracle General Ledger application. 3 In the Shorthand region, enter information in the following fields: Enabled: Selected Max Alias Size: 15 Prompt: Shorthand 4 In the Aliases, Descriptions region, enter information for the first alias in the following fields: Alias: XX_SA_1 Template: 03.100.1110.0000 Alias Description: Yellow Sales Cash 5 Save your work. 6 In the Aliases, Descriptions region, enter information for the second alias in the following fields: Alias: XX_SA_2 Template: 04...0000 Alias Description: Green 7 Save your work. 8 Navigate to the Key Flexfield Segments window. System Administrator: (N) Application>Flexfield>Key> Segments 9 Query the XX Chart of Accounts structure for the Accounting Flexfield in the Oracle General Ledger application. 10 Click the Compile button to compile the flexfield definition. Navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1.
Value Sets
Users
Delivery Terms
Controlling Access to Flexfield Values by Specifying Value Security Rules Responsibilities are used within Oracle Applications to specify what operations a user can perform. Responsibilities limit the forms and reports a user can access. Responsibilities are equivalent to job descriptions and therefore usually map onto data access privileges as well. Users of the same responsibility generally need to see the same data. You can define security rules to restrict users from using flexfields to enter or display certain data. Once you associate these rules with the appropriate responsibility, all users of that responsibility are restricted to the values allowed by that responsibilitys security rule. Example In the example on the slide, a company has assigned its sales force to different responsibilities according to the type of items they sell. Two of these responsibilities are Electronic Sales and Household Sales. A value set called Item Type lists all the types of items the company sells. In this case, you can easily define a security rule to restrict the users of a particular responsibility from accessing item types not appropriate for their responsibility. For example the Hshld_Goods_Only security rule allows access only to the FURN and APPL item types.
Some Some forms forms allow allow display display of of restricted restricted values values but but not update. not update. Security Security does does not not restrict restrict non-flexfield non-flexfield data data entry. entry.
How Value Security Works You can apply security to the value sets used by key flexfield segments, descriptive flexfields segments, and request parameters. Security rules have no effect for segments or parameters that use value sets with a validation type of None, Special, Pair, Translatable Independent, or Translatable Dependent, or for segments without a value set. Security rules provide data entry and querying control. Once the security rule is associated with a responsibility, a list of values displays only the values appropriate to that responsibility. Some forms permit querying of restricted values but do not permit updating of restricted values. Security rules apply only to data entered through the forms on which the flexfield appears. They do not apply to data created or copied automatically by the applications themselves. Therefore, be careful when loading data without using Oracle Application forms.
Element INCLUDE
EXCLUDE
Security Rule Elements Security rules are defined in terms of the values in the value set. Certain values or value ranges are either included or excluded by a rule. The same rule can specify both values to be included as well as different values to be excluded. By default all values are excluded unless explicitly included, and exclusion tests override inclusion tests.
Total Assets Cash International Cash Accounts Receivable Other Receivables Interest Receivable
Specifying Security Rules Whenever possible, restrict access to ranges of values. Plan values carefully to make security rules easy to define. Example Assume you have a value set ACCOUNT TYPE. Since the accounts are distinguished by the account type number, you can define a rule including all account types in the 1100 account type number series. This rule can later be assigned to an appropriate responsibility to restrict users from accessing anything but cash account types.
Using Multiple Elements As shown on the previous slides, you define security rules in terms of exclude or include clauses. You can combine these clauses as necessary to effect the restrictions you need. A security rule can therefore consist of one clause or many. You can apply security rules to more than one responsibility, and a single responsibility can have more than one security rule associated with it. It is not unusual for several responsibilities to share a broadly defined security rule with some of the responsibilities also having more restrictive security rules. Example The examples on the slide show two rules: one containing multiple clauses and one consisting of only one clause.
(Union)
Interaction of Security Rules and Elements Since a responsibility can have multiple security rules for the same value set, it is important to consider the interaction of security rules. In a single security rule: Everything is excluded unless explicitly included. The clauses have a logical OR relationship to one another so that the result is a union of all included values. If a value satisfies the criteria for both an include and an exclude, it is excluded. In multiple security rules: More rules restrict more not less. All values must pass all security rules to be acceptable. The different rules have a logical AND relationship to one another so that the intersection of the rules included values applies. If a value satisfies the criteria for both an include and an exclude, it is excluded. Example The slide shows two examples of security rules operating on a value set. The values approved by the different rules are shown in italics.
(Union)
Rule Results Without Overlapping Ranges If the values specified by the clauses do not overlap, the result sets are different: The result set for a responsibility with a single security rule with multiple clauses contains all values that satisfy any of the include clauses. Any excluded values are removed. The result set for a responsibility with multiple rules contains no members if there are no values that satisfy all the rules.
Enabling Enabling Security Security for for a a Value Value Set Set
To To enable enable security security for for a a value value set, set, check check the the Security Security Available Available check check box box in in the the Value Value Sets Sets window. window. You You must must enable enable security security for for the the value value set set before before you you can can define define security security rules rules for for that that value value set. set.
(N) (N) Application>Flexfield>Key>Segments Application>Flexfield>Key>Segments (B) (B) Segments Segments (B) Open (B) Open The The path pathto to the the Segments Segments window windowdepends depends on on which whichapplication application you you are are using. using. This This path pathis is in in the the System System Administrator Administrator responsibility. responsibility.
Enabling Enabling Security Security for for a a Program Program Parameter Parameter
To To enable enable security security for for a a concurrent concurrent program program parameter, parameter, check check the the Enable Enable Security Security check check box box in in the the Concurrent Concurrent Program Program Parameters Parameters window. window.
Description Description Message Message Security Security Rule Rule Elements Elements (Include/Exclude) (Include/Exclude)
(N) (N) Security>Responsibility>Value Security>Responsibility>Value Set>Define Set>Define The The path pathto to the the Define Define Security Security Rules Rules window windowdepends depends on on which which application application you youare are using. using. This This path path is is in inthe the System System Administrator Administrator responsibility. responsibility.
Defining Security Rules To define security information for an existing value set, search for that value sets definition by its value set name, or by any flexfield segment or concurrent program parameter that uses that value set. Specify how you wish to search by selecting the appropriate option. Security must be enabled for the value set, or it will not appear. Specify include and exclude ranges for values. An automatic exclude rule excludes all values not explicitly included. Rules without elements therefore exclude everything. Without any rules, anyone can see and use any segment value. On most computers, 0 < Z.
(N) (N) Security>Responsibility>Value Security>Responsibility>Value Set>Assign Set>Assign The path to the Assign Security Rules window The path to the Assign Security Rules window depends depends on onwhich which application application you youare are using. using. This This path path is is in inthe the System System Administrator Administrator responsibility. responsibility.
Practice 4-3
Practice 4-3 Instructions Scenario Flexfield security rules control access to specific segment values by responsibility. These rules can be set up for any or all segments. Security rules are tied to a responsibility, which is in turn associated with users. In this practice, you will create a rule that prevents users from viewing an account. You will assign the rule to the General Ledger, Vision Operations (USA) responsibility. When you log in to this responsibility to test your key flexfield, this account will not appear in the list of values. Note: Before you can use security for a flexfield segment, you must enable security both at the value set level and at the segment level. Step 1: Define a Security Rule Use the Define Security Rules window to define a security rule for the ACCT segment of the Accounting Flexfield structure, XX Chart of Accounts, that you defined in Practice 3-1. Name the rule XX_SR01, and give the rule a description. Enter an error message to explain the rule to users. Define two security rule elements. Define the first security rule element to include all the possible account values, from 0000 to zzzz. Define the second security rule element to exclude the account 4110. Step 2: Assign the Rule to a Responsibility
Copyright Oracle Corporation, 2000. All rights reserved.
Use the Assign Security Rules window to assign your security rule to the General Ledger, Vision Operations (USA) responsibility in the Oracle General Ledger application. After defining the security rule, navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1. Practice 4-3 Solutions Step 1: Define a Security Rule 1 Navigate to the Define Security Rules window. System Administrator: (N) Security>Responsibility> ValueSet>Define 2 In the Find window, select Key Flexfield and find the ACCT segment of the XX Chart of Accounts structure for the Accounting Flexfield in the Oracle General Ledger application. 3 In the Security Rules region of the Define Security Rules window, enter information in the following fields: Name: XX_SR01 Description: XX Security Rule 01 Message: GL responsibility cannot use account 4110. 4 In the Security Rule Elements region, enter information for the first rule element in the following fields: Type: Include From: 0000 To: zzzz 5 In the Security Rule Elements region, enter information for the second rule element in the following fields: Type: Exclude From: 4110 To: 4110 6 Save your work. Step 2: Assign the Rule to a Responsibility 1 Navigate to the Assign Security Rules window by clicking the Assign button in the Define Security Rules window. System Administrator: (N) Security>Responsibility> Value Set>Define (B) Assign 2 In the Security Rules region, enter information in the following fields: Application: Oracle General Ledger Responsibility: General Ledger, Vision Operations (USA) Name: XX_SR01 3 Save your work.
After defining the security rule, navigate to the Accounting Flexfield and test the results of your work, as described in step 4 of Practice 3-1.
Summary
Summary Summary
Cross-validation Cross-validation rules rules control control combinations combinations of of segment values. segment values. Cross-validation Cross-validation rules rules specify specify the the segment segment values values to to be be either either included included or or excluded. excluded. Frequently Frequently entered entered combinations combinations of of values values are are candidates for shorthand aliases. candidates for shorthand aliases. Define Define aliases aliases and and enable enable shorthand shorthand alias alias entry. entry. Use Use security security rules rules to to control control access access through through a a flexfield. flexfield. Security Security rules rules are are applied applied to to a a value value set. set. Security Security can can be be enabled enabled for for any any flexfield flexfield segment segment or or report report parameter parameter that that uses uses that that value value set. set.
Summary Cross-validation rules are used to restrict invalid combinations of segment values. Rules are defined by specifying the value combinations that are either allowed (included) or disallowed (excluded). Cross-validation rules are not tied to a responsibility like security rules. You can combine cross-validation rules as needed. Short aliases provide a way to speed entry of frequently used value combinations. Any key flexfield is a candidate for shorthand alias entry. You can control the access to data by defining value security rules. These rules list the allowable values for display or selection through a flexfield segment. The rules are applied to the value set defined for that flexfield segment. Once you have defined the rules, you assign them to a responsibility. All users of that responsibility are then restricted to the approved values when using the flexfields segment.
Objectives
Objectives Objectives
After After completing completing this this lesson, lesson, you you should should be be able able to to do do the the following: following: Identify Identify the the descriptive descriptive flexfield flexfield to to be be used used and and the the information to be gathered information to be gathered Organize Organize the the information information according according to to usage usage
Plan Plan the the layout layout of of the the descriptive descriptive flexfield flexfield Plan Plan the the behavior behavior of of the the descriptive descriptive flexfield flexfield Define Define the the descriptive descriptive flexfield flexfield structure structure Define Define global global segments segments Define Define context-sensitive context-sensitive segments segments as as appropriate appropriate
Lesson Topics This lesson describes the process required to plan a descriptive flexfield. At the end of this lesson, you should be able to: Identify the descriptive flexfield to be used and the information to be gathered Organize the information according to usage Plan the layout of the descriptive flexfield Plan the behavior of the descriptive flexfield Define the descriptive flexfield structure Define global segments Define context-sensitive segments as appropriate
Overview
Overview Overview
Identifying Identifying and and organizing organizing data data Arranging Arranging different different descriptive descriptive flexfield flexfield layouts layouts Specifying Specifying the the flexfield flexfield mechanics mechanics Specifying Specifying descriptive descriptive flexfield flexfield attributes attributes Defining Defining a a descriptive descriptive flexfield flexfield with with global global segments segments Defining Defining a a descriptive descriptive flexfield flexfield with with both both global global and and context-sensitive context-sensitive segments segments
Lesson Overview Descriptive flexfields allow the user to gather additional information beyond that gathered by Oracle Applications. The information gathered by a descriptive flexfield and the structure of that information can vary between different users. This lesson covers analyzing and organizing the additional data, designing the different flexfields layouts, and specifying how the descriptive flexfield will behave. This lesson also covers the mechanics of defining a descriptive flexfield. Flexfields consisting of only global segments as well as both global and context-sensitive segments are covered.
Implementing a Descriptive Flexfield Descriptive flexfields provide an easy and powerful way to extend the processing of Oracle Applications. However, since descriptive flexfield structures can be organized in many ways, you should spend some time in planning the new flexfield to ensure a successful result. Follow these steps to implement your descriptive flexfield: 1 Identify the flexfield to implement. Descriptive flexfields do not exist in a vacuum. They are logically related to the form on which they appear. Once you decide to implement the descriptive flexfield on a form, you must identify which descriptive flexfield it is. 2 Determine the system resources available to you. The number of segments available for use on your flexfield depends on the number of underlying columns in the base table. Since this will control the number of segments you have available for use, you must find this information before you can plan your design. 3 Identify the items of information you wish to gather. The information you gather should be logically related to the other information on the form. 4 Design the flexfield layout. Determine the number of segments and how they will be combined into structures. 5 Design the flexfield behavior. If you have multiple structures, determine how to process the different contexts.
Define the actual flexfield. Use the descriptive flexfield definition windows to enter your definition. Freeze and compile the definition to make the flexfield available to other users.
Using Descriptive Flexfields Descriptive flexfields have many uses in Oracle Applications: Flexfields expand Oracle Applications processing without programming. Descriptive flexfields provide user-customizable expansion space in forms by enabling built-in blank fields to store extra data. Each installation of Oracle Applications may use descriptive flexfields differently. You can use different structures for different contexts. Use different segments depending on other information in the form or the descriptive flexfield. Allow only the appropriate context-sensitive segments to appear. Flexfields save space. Non-essential information resides in a descriptive flexfield that pops up only when the information becomes necessary. If no extra fields are needed, the descriptive flexfield occupies little additional space on the form.
Benefits information Calendar information Labor cost information Lease information Payment information
Credit information
Budget information
Typical Information Collected by Descriptive Flexfields The slide shows typical business areas in which you may need to track additional or specialized information. You can easily define a descriptive flexfield to gather and store as much extra data as is required for your business needs.
Some Some Oracle Oracle Applications Applications Descriptive Descriptive Flexfields Flexfields
Oracle Assets Oracle General Ledger Bonus Rates Calendar Types Price Indexes Oracle Payables Bank Branch Payment Terms Site Address
Daily Rates
Oracle Applications Descriptive Flexfields (Partial) There are many descriptive flexfields available for use within Oracle Applications. The slide shows only some of the flexfields available.
Determining Determining the the Descriptive Descriptive Flexfield Flexfield Name Name
Since Since descriptive descriptive flexfields flexfields are are not not labeled labeled on on the the base base form, form, once once you you recognize recognize a a descriptive descriptive flexfield flexfield you you wish wish to to implement, implement, use use the the following following procedure procedure to to determine determine the the name name of of the the flexfield: flexfield: 1. 1. Click Click on on a a field field in in the the same same block block in in which which the the descriptive descriptive flexfield flexfield appears. appears. 2. 2. Select Select Help>Diagnostics>Examine. Help>Diagnostics>Examine. This This opens opens a a window window showing showing information information on on the the selected selected field. field. Note Note the the name name of of the the block block in in which which the the field field is is located. located.
Determining Determining the the Descriptive Descriptive Flexfield Flexfield Name Name
3. 3. Click Click the the Block Block list list of of values values button button to to display display a a list list of of the the available available blocks blocks for for this this form. form. Select Select $DESCRIPTIVE_FLEXFIELD$. $DESCRIPTIVE_FLEXFIELD$. 4. 4. Click Click the the Field Field list list of of values values button button to to display display a a list list of the descriptive flexfields for this form. Each of the descriptive flexfields for this form. Each entry entry is is prefixed prefixed by by the the name name of of the the block block in in which which the the descriptive descriptive flexfield flexfield appears. appears. Find Find the the entries entries for for the the block block whose whose name name you you determined determined in in step step 2. 2. 5. 5. Select Select the the flexfield flexfield you you wish wish to to implement implement from from the the entries entries for for that that block. block. The The user user name name of of the the descriptive descriptive flexfield flexfield appears appears in in the the Value Value field. field.
Determining the Available Resources Once you have identified the descriptive flexfield you want to implement, you need to determine how many segments you can plan for. To do this, you need to know the number of ATTRIBUTE columns in the underlying table. Find the flexfield definition and navigate to the Segments Summary window for that flexfield. Use the list of values on the Column field to display a list of the attribute columns. You will use this list of values again later to assign a segment to an underlying column, but you can also use it for planning now. The columns are numbered sequentially, so the highest numbered column tells you how many segments you can use.
Planning Questions
Identifying Your Information Needs Once you know what resources you have available, you can begin to plan the layout of the flexfield. First determine your information needs. Some of the questions to ask are shown on the slide. Before you can start designing the flexfield structure, you should know what information needs to be gathered by this flexfield, and how the information will be used.
Store number
Check number
Expiration date
Down payment
Identifying Needed Information Assume you are planning a descriptive flexfield that will gather additional sales payment information. Some of the possible items of data in which you might be interested appear on the slide.
Situation 2: (check)
Store number
Check number
Store number
Expiration Date
Organizing Information by Usage After you have identified all the items of information you want to gather, organize them by usage. Are all the items used all the time? Are all the items used in the same way? The slide shows three different payment situations and the items of information appropriate for each situation.
Situation 2: (check)
Store number
Check number
Store number
Expiration Date
Varies by task
Isolate Common Information After you have organized the items of information by usage, isolate any items that occur in all situations. You define the information used by all tasks in one structure and the information that varies by task in another, task-specific structure.
Determine Your Contexts After you have removed the commonly occurring information, you can organize the remaining information into groups according to the type of information being gathered or the way the information is being used. These different groups of information are called contexts. Once you have determined the items of information that are always appropriate and the different contexts with each of their pieces of information, you are ready to begin defining your flexfield.
Descriptive Flexfield Components Descriptive flexfields are constructed from segments. Each segment contains one item of information. Since the same flexfield can be used by different contexts, and each context needs different items of information, you need to design different layouts for the same flexfield to support the different contexts. Specify your layout in terms of global segments and context-sensitive segments.
Global Segments
Using Global Segments Global segments are segments that appear regardless of context. Always plan your global segments first. Some descriptive flexfields use only global segments. Continuing the payment information example, the slide shows that the store number is appropriate for all contexts. Thus it is an obvious global segment. Global segments are the easiest to define. However, they may use up the allotted columns. Columns used for global segments cannot hold an contextsensitive segments. You can add context-sensitive segments later if columns are available, but enabled global segments always appear.
Context-Sensitive Segments
Second ID
Context-Sensitive Segments Context sensitive segments occur depending on the context. The slide shows sample contexts and the segments that are unique to each of them.
Distinguishing Between Contexts If your descriptive flexfield uses different contexts, you must decide how to distinguish between them. You must identify a field whose value can distinguish between contexts. This field is called the context field. In some cases, you can use an existing field as the context field, in other cases, you must create a segment on the descriptive flexfield.
Using Reference and Context Fields There are two design options for distinguishing between contexts: If there is an existing field on the base window or an existing profile option whose value can be used to distinguish between contexts, it can be used as a reference field. If there is no existing field or profile option that can be used to automatically select the context, you may choose to allow users to manually select the context.
Reference field
Using Reference Fields Reference fields are fields on the existing window whose values can determine which context a descriptive flexfield uses under the following conditions: The field must be defined to be referenceable. Not all fields on a window can be used as a reference field. The values appearing in the reference field should be known and predictable. Since the same descriptive flexfield can appear on different windows, any field used as a reference field for that descriptive flexfield must appear on the same windows. Also, the reference field must have the same internal name in all the forms where the flexfield is used.
(Context fields)
Using a Context Field Sometimes there is no field on the existing window that is appropriate for use as a reference field. In this case, you need to create a column on the descriptive flexfield itself to hold and display the different possible context values. A context field is an additional field appearing on the descriptive flexfield. The user can display the appropriate context by selecting a value from the pop-up list for the context field. A context field is not a segment. The context field has a context field prompt. The response, called a context field value, determines which group of context-sensitive segments appears next. Each value for the context field can correspond to a separate contextsensitive structure. Context fields do not always display. Non-displayed context fields derive values from a default or from a reference field, and the user cannot change the context field value.
Planning Planning Flexfields: Flexfields: Global Global Segments Segments Only Only
Using Global Segments Only Some descriptive flexfields use global segments only. The information gathered by that flexfield is valid for all users of the flexfield. All global segments display when the user enters the flexfield, and each segment prompts the user for one item of information.
Planning Planning Flexfields: Flexfields: Context Context Segments Segments Only Only
Existing application window
Context Prompt
Using Context-Sensitive Segments Only Some descriptive flexfields use only context-sensitive segments. They have no global segments. The flexfield contains only the context field prompt until a context is chosen. The context field value that is chosen determines which context is displayed in a second window.
Planning Planning Flexfields: Flexfields: Global Global and and Context Context Fields Fields
Global Segments Context Prompt Global Segments Context Sensitive Fields
Structure 1
Structure 2
Using a Combination of Global and Context-Sensitive Segments Most descriptive flexfields use a combination of global and context-sensitive segments. With a combination of global and context-sensitive segments, the processing is as follows: When the user opens the flexfield, all the global segments and a context prompt appear. Once the user chooses a context, the appropriate context-sensitive segments are added to the already visible global segments.
Context Context Field Field Context Context Field Field Values Values
Specifying the Flexfield Attributes Once you have the structure designed and the context behavior determined, you can plan the flexfield cosmetics. These include: The context prompt All the segment prompts The segment separator Specifying the Flexfield Structures All of the segments contained on the flexfield will be defined to a structure. There is a default structure, Global Data Elements, to which you define all global segments. In addition to the Global Data Elements structure, you create a separate structure for each context. Use meaningful context names since they show up in the list of values for the contexts. Clear the enabled box if you ever need to mark this structure as unavailable. When you have specified your structure information, click the Segments button to define your structure segments.
Specifying Specifying the the Context Context Field Field Information Information
In In the the Context Context Field Field region region of of the the Descriptive Descriptive Flexfield Flexfield Segments Segments window, window, you you can can define: define: Prompt Prompt Default Default Value Value
Reference Reference Field Field Value Value Required Required Override Override Allowed Allowed (Display (Display Context) Context)
Specify How the Context Is Determined Override Allowed (Display Context) - Clear this check box if you want to restrict the user from choosing different contexts. If you use a reference field, you do not have to display the context field unless you want to allow the user to select a context different from the reference field value. If you do not display the context field and are not using a reference field, you should define a default context value as discussed below. Prompt - This is the prompt context displayed on the flexfield. If you choose to display the context field, you must supply a value for this field. Default Value - Specify a default context structure to use. Always define a value here if you are not using a reference field and not displaying the context field. Reference Field - If you use a reference field, enter the name here in the format Block.field. Use the pop-up list on this field to display a list of the fields on the base window that are most likely to be referenced.
Name Name Window Window Prompt Prompt Column Column Value Value Set Set Displayed Displayed Enabled Enabled
Specifying Segment Attributes Specify the following attributes for each segment in the structure: Number - The placement of the field on the window, from top to bottom. Name - The internal name for this segment. Window Prompt - The prompt to be displayed for this segment on the flexfield. Column - The ATTRIBUTE column stores the data from this segment. Available columns are selectable from a pop-up list for this field. See the following page for an explanation of how ATTRIBUTE columns store descriptive flexfield data. Value Set - If you wish the validate the data entered through this segment, specify a value set to perform validation checking. Displayed - Clear this check box if you need to prevent the display of this field. Enabled - Select this check box to mark this segment ready for processing.
Storing Descriptive Flexfield Segments As mentioned previously, the segments that make up a descriptive flexfield are stored in columns in the underlying tables. Each segment stores its data in one of the ATTRIBUTE columns. This does not mean, however, that every segment on the flexfield needs its own column. As shown on the slide, context-sensitive columns from different contexts can share the same column. The value in the CONTEXT column distinguishes between context segments.
order by fdftl.title;
Descriptive Flexfield Application Tables This SQL*Plus query can be used to determine the application base table where a descriptive flexfield stores its data. This is a partial report for one application (Oracle General Ledger - application ID 101) and does not show any information
for flexfields used with SRS.
TITLE -----------------------------Accounting Calendar: Calendar Accounting Calendar: Periods AutoAccounting Rules AutoAllocation Batch AutoPost Criteria AutoReversal Criteria Automatic Posting Sets Budget Types Budget Versions Budgetary Control Group: Group Budgetary Control Group: Rules Common Stocks: Share Activity Conversion Rate Types APPLICATION_TABLE_NAME ---------------------------GL_PERIOD_SETS GL_PERIODS GL_IEA_AUTOGEN_MAP GL_AUTO_ALLOC_BATCHES GL_AUTOMATIC_POSTING_OPTIONS GL_AUTOREVERSE_OPTIONS GL_AUTOMATIC_POSTING_SETS GL_BUDGET_TYPES GL_BUDGET_VERSIONS GL_BC_OPTIONS GL_BC_OPTION_DETAILS GL_SHARES_ACTIVITY GL_DAILY_CONVERSION_TYPES
Specifying Specifying the the Segment Segment Detail Detail Attributes Attributes
In In the the Validation Validation region region of of the the Segments Segments window, window, you you can can define: define: Value Value Set Set Description Description
Default Default Type Type Default Default Value Value Required Required Security Security Enabled Enabled
Specifying the Segment Detail Attributes You can use this window to specify any additional attributes for the segment. Validation Block Entries Value Set - The name of the value set used to validate data entered through this segment. Description - The description of this value set. Default Type - If you wish to define a default value for this segment, select the data type here. Default Value - Define the actual default here. Required - Select this checkbox if a value for this segment is mandatory. Security Enabled - Select this checkbox to turn on any security rules for this value set.
Specifying Specifying the the Segment Segment Detail Detail Attributes Attributes
In In the the Sizes Sizes region region of of the the Segments Segments window, window, you you can can define: define: Display Display Size Size Description Description Size Size
Specifying the Segment Detail Attributes (continued) Sizes These sizes determine the width of the field on the flexfield that is used to display this segment. Especially consider the interaction between Display Size and the Maximum Size value defined to the value set used with this segment.
Specifying Specifying the the Segment Segment Detail Detail Attributes Attributes
In In the the Prompts Prompts region region of of the the Segments Segments window, window, you you can can define: define: List List of of Values Values Window Window
Specifying the Segment Detail Attributes (continued) Prompts List of Values - By default, this will be the same as the segment name. It should not be larger than the Display Size. Window - Specify the label that will appear to the left of this segment on the flexfield.
Default Type Constant Current Date Current time Field Profile Segment SQL Statement
Default Value Any literal value Current time Current time or current date/time Default Value field value Value of profile in Default Value Value in prior segment Result of SQL query
Specifying Segment Defaults - Examples Default Type: Constant Default Value: The constant specified. Example: USA Result: USA Default Type: Current Date Default Value: The date at the time of entry. Example: Result: MAY 01, 2000 Default Type: Current Time Default Value: The Date/Time at the time of entry. Example: Result: 14:30:00 MAY 01, 2000 Default Type: Field Default Value: The value in the specified field. Use the format block:field Example: ORDER:LINE
Copyright Oracle Corporation, 2000. All rights reserved.
Result: 3 Default Type: Profile Default Value: The value of the specified profile option. Use the application name of the profile option. Example: GL_SET_OF_BOOKS_ID Result: 101 Default Type: Segment Default Value: The value returned by the specified previous segment. Example: Company Result: 01 Default Type: SQL Statement Default Value: The value returned by the specified SQL statement. The statement must return a single value. $PROFILES$ and $FLEX$ can be used in the statement. Example: SELECT NAME FROM EMP WHERE JOB=CEO Result: Jones
Defining Defining the the Flexfield Flexfield Header Header Attributes Attributes
Use Use the the Descriptive Descriptive Flexfield Flexfield Segments Segments window window to to enter: enter: Application Application Title Title
Freeze Freeze Flexfield Flexfield Definition Definition Segment Segment Separator Separator Global Global Data Data Elements Elements
Defining the Header Attributes The header attributes you specify include: Application - The application that owns the flexfield. Title - The title displayed at the top of the flexfield. Freeze Flexfield Definition - Select this box when you have finished defining your flexfield. Freezing the definition enables the Compile button so you can compile your definition. Segment Separator - Specify a separator to be used when displaying concatenated segment values. Global Data Elements - If your structure has no context-sensitive structures, select Global Data Elements and click the Segments button to define the global segments. Define the segments that always appear regardless of the context value. Define global segments first to facilitate efficient column use.
Name Name Window Window Prompt Prompt Column Column Value Value Set Set Displayed Displayed Enabled Enabled
Defining Segment Attributes Number - Specify the sequence number (from top to bottom) of this segment within the flexfield structure. The segments defined for Global Data Elements always appear first. They are the followed by the segments defined for whatever other context-sensitive structure is selected. Name - Enter the name for this segment. Window Prompt - Enter a prompt to show up on the flexfield window. The default is to use the Name. Column - Select the ATTRIBUTE column in the base table to hold this segments data. A pop-up list for this field displays the columns available to you for definition. Value Set - Specify an existing value set to validate the data for this segment. Click the Open button to define additional attributes for your segment.
Specifying Specifying Validation Validation and and Field Field Sizes Sizes
Use Use the the Segments Segments window window to to enter enter options options for: for: Validation Validation
(N) (N) Application>Flexfield>Descriptive>Segments Application>Flexfield>Descriptive>Segments (B) (B) Segments Segments (B) (B) Open Open
Specifying Validation and Field Sizes Use this window to specify additional attributes for the segment. If you are using a value set to validate the input in this segment, enter the name of the value set. You can also enter a default for the segment and enable security. Use the Sizes fields to control the display of the segment in the flexfield window. Specify the Display Size of the flexfield segment to be the same as the Maximum Size of the value set used by this segment to avoid scrolling. Index Flag (Accounting Flexfield Only) - This is used with the General Ledger Optimizer feature.
Freezing Freezing and and Compiling Compiling the the Definition Definition
Use Use the the Descriptive Descriptive Flexfield Flexfield Segments Segments window window to: to: Freeze Freeze the the flexfield flexfield definition definition by by checking checking the the Freeze Flexfield Definition check box Freeze Flexfield Definition check box Compile Compile the the flexfield flexfield definition definition by by clicking clicking the the Compile Compile button button
Freezing and Compiling the Definition Freeze the flexfield information to notify the application to begin using the flexfield. Compiling the flexfield stores the information efficiently. If the compile detects any problems, a message window displays a warning. Flexfields automatically compile the flexfield definition at every commit on this form. The request for view generation automatically follows compilation. You see your own changes immediately. Other users must exit or change responsibilities to see the new definitions take effect.
Reference Reference Field Field Value Value Required Required Override Override Allowed Allowed (Display (Display Context) Context) Context Field Values Context Field Values
Defining Context Information Define context information to determine how context-sensitive structures are chosen. If not using a reference field to obtain the context value, enter a context field prompt. This is the prompt that instructs the user to select a context. Optionally enter a default value. This should be the name of the most common context-sensitive structure. If you use a reference field, ensure that the default value can be obtained from the reference field. Specify whether the context field is required. Without a required response in the context field, users can avoid entering any information in any of the context-sensitive structures. If you are requiring a context value and not displaying a context prompt, either provide a default or ensure that a value can be obtained from a reference field value. If you are using a reference field, specify the field name in the Reference Field field. Not all fields on the window can be used as a reference field. Use the list of values for this field to set the possible reference fields for the window. Enter the context values in the Context Field Values region. The names of these structures must exactly match the values you expect to see in the context field.
Enable Enable the the segment. segment. Define Define any any validation validation information. information. Modify Modify the the display display size size if if necessary. necessary. Freeze Freeze and and compile compile the the definition. definition.
(N) (N) Application>Flexfield>Descriptive>Segments Application>Flexfield>Descriptive>Segments (B) (B) Segments Segments (B) (B) Open Open
Defining Defining Values Values for for a a Value Value Set Set
After After you you finish finish defining defining the the descriptive descriptive flexfield flexfield structure, structure, use use the the Segment Segment Values Values window window to to define define values for any independent or dependent value values for any independent or dependent value sets sets assigned assigned to to any any segments segments of of the the descriptive descriptive flexfield. flexfield.
Practice 5-1
Practice 5-1 Instructions Practice Notes To perform the practices in this lesson and the next, you will need a descriptive flexfield to work on. Your instructor will assign you a descriptive flexfield that has not yet been used in the database you are accessing. You will use the same flexfield for practices throughout these two lessons. The list below assigns each team number a unique descriptive flexfield and shows the navigation path to the flexfield. The paths start from the General Ledger, Vision Operations (USA) responsibility. Your instructor will tell you which flexfield you are to design. Team: 01 Descriptive Flexfield Title: Accounting Calendar: Periods Navigation Path: Setup>Financials>Calendars>Accounting (Periods region) Team: 02 Descriptive Flexfield Title: AutoPost Criteria Navigation Path: Setup>Journal>AutoPost
Team: 03 Descriptive Flexfield Title: Budgetary Control Group: Rules Navigation Path: Budgets>Define>Controls (Budgetary Control Rules region) Team: 04 Descriptive Flexfield Title: Conversion Rate Types Navigation Path: Setup>Currencies>Rates>Types Team: 05 Descriptive Flexfield Title: Define Budget Organization: Organization Navigation Path: Budgets>Define>Organization Team: 06 Descriptive Flexfield Title: Define Recurring Journal: Batch Navigation Path: Journals>Define>Recurring Team: 07 Descriptive Flexfield Title: Journal Categories Navigation Path: Setup>Journal>Categories Team: 08 Descriptive Flexfield Title: Journal Sources Navigation Path: Setup>Journal>Sources Team: 09 Descriptive Flexfield Title: Open and Close Periods Navigation Path: Setup>Open/Close Team: 10 Descriptive Flexfield Title: Period Rates Navigation Path: Setup>Currencies>Rates>Period Team: 11 Descriptive Flexfield Title: Period Types Navigation Path: Setup>Financials>Calendars>Types Team: 12 Descriptive Flexfield Title: Summary Accounts
Copyright Oracle Corporation, 2000. All rights reserved.
Navigation Path: Setup>Accounts>Summary Team: 13 Descriptive Flexfield Title: Suspense Accounts Navigation Path: Setup>Accounts>Suspense The following two descriptive flexfields can be accessed through the General Ledger, Vision Operations (USA) responsibility but are owned by Application Object Library. Team: 14 Descriptive Flexfield Title: Define Sequences Navigation Path: Setup>Financials>Sequences>Define Team: 15 Descriptive Flexfield Title: Currencies Navigation Path: Setup>Currencies>Define Scenario Descriptive flexfields use two types of segments: global and context-sensitive. In this practice, you will create a descriptive flexfield using only global segments. You will also create value sets that provide lists of values for your user. The descriptive flexfield is designed to track the following additional information about orders that have been held: Who held the order The reason the order was held The amount of time the order was held Step 1: Define Value Sets Use the Value Sets window to define three value sets. Define an independent value set named XX_WHO_HELD. Give the value set a description, a format type of Char, and a maximum size of 2. Enable security for the value set. Define an independent value set named XX_WHY_HELD. Give the value set a description, a format type of Char, and a maximum size of 3. Enable security for the value set. Define an independent value set named XX_HOW_LONG_HELD. Give the value set a description, a format type of Char, and a maximum size of 3. Enable security for the value set. Step 2: Define the Structure (Segments) After defining your value sets, use the Descriptive Flexfield Segments window to define the structure for the descriptive flexfield assigned to you. Do not allow
overrides for the context. Define three segments for the Global Data Elements context. Define a segment named Who Held, with a prompt of Who. Assign the segment the number 10, the column ATTRIBUTE1, and the value set XX_WHO_HELD. Define a segment named Why Held, with a prompt of Why. Assign the segment the number 20, the column ATTRIBUTE2, and the value set XX_WHY_HELD. Define a segment named How Long, with a prompt of Length. Assign the segment the number 30, the column ATTRIBUTE3, and the value set XX_HOW_LONG_HELD. Ensure that all three segments are displayed and enabled. When you finish defining the structure, freeze and compile your flexfield definition. Step 3: Define Values After defining the value sets and segments for your flexfield, use the Segment Values window to define the values associated with each of the independent value sets. Define and enable the following values for the XX_WHO_HELD value set. Value: 01 Description: Helen Myers Value: 02 Description: Mien Chan Value: 03 Description: Michael Keller Value: 04 Description: Luis Galvez Define and enable the following values for the XX_WHY_HELD value set. Value: FIR Description: Further information required Value: MAR Description: Manager authorization required Value: AJR Description: Additional justification required
Define and enable the following values for the XX_HOW_LONG_HELD value set. Value: 100 Description: Less than one week Value: 200 Description: One week to one month Value: 300 Description: One month to one year
Value: 400 Description: More than one year After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving. Practice 5-1 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_WHO_HELD Description: XX Who Held Value Set Security Available: Selected Format Type: Char Maximum Size: 2 Validation Type: Independent 3 Save your work. 4 Enter the information for the second value set in the following fields: Value Set Name: XX_WHY_HELD Description: XX Why Held Value Set Security Available: Selected Format Type: Char Maximum Size: 3 Validation Type: Independent 5 Save your work. 6 Enter the information for the third value set in the following fields: Value Set Name: XX_HOW_LONG_HELD
Copyright Oracle Corporation, 2000. All rights reserved.
Description: XX How Long Held Value Set Security Available: Selected Format Type: Char Maximum Size: 3 Validation Type: Independent 7 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Descriptive Flexfield Segments window. System Administrator: (N) Application>Flexfield> Descriptive>Segments 2 Query your descriptive flexfield. 3 In the Context Field region, ensure that the Override Allowed (Display Context) check box is cleared. 4 In the Context Field Values region, select the Global Data Elements context and click the Segments button to navigate to the Segments Summary window. 5 Enter the information for the first segment in the following fields: Number: 10 Name: Who Held Window Prompt: Who Column: ATTRIBUTE1 Value Set: XX_WHO_HELD Displayed: Selected Enabled: Selected 6 Save your work. 7 Enter the information for the second segment in the following fields: Number: 20 Name: Why Held Window Prompt: Why Column: ATTRIBUTE2 Value Set: XX_WHY_HELD Displayed: Selected Enabled: Selected 8 Save your work. 9 Enter the information for the third segment in the following fields: Number: 30 Name: How Long Window Prompt: Length Column: ATTRIBUTE3
Value Set: XX_HOW_LONG_HELD Displayed: Selected Enabled: Selected 10 Save your work. 11 Navigate back to the Descriptive Flexfield Segments window. 12 Select the Freeze Flexfield Definition check box. 13 Click the Compile button to compile the flexfield definition. Step 3: Define Values 1 Navigate to the Segment Values window. System Administrator: (N) Application>Validation>Values 2 In the Find window, select Value Set and find the XX_WHO_HELD value set. 3 In the Values, Effective region of the Segment Values window, define the following values: Value: 01 Description: Helen Myers Enabled: Selected Value: 02 Description: Mien Chan Enabled: Selected Value: 03 Description: Michael Keller Enabled: Selected Value: 04 Description: Luis Galvez Enabled: Selected 4 Save your work. 5 Select Value Set and find the XX_WHY_HELD value set. 6 In the Values, Effective region, define the following values: Value: FIR Description: Further information required Enabled: Selected Value: MAR Description: Manager authorization required Enabled: Selected
Copyright Oracle Corporation, 2000. All rights reserved.
Value: AJR Description: Additional justification required Enabled: Selected 7 Save your work. 8 Select Value Set and find the XX_HOW_LONG_HELD value set. 9 In the Values, Effective region, define the following values: Value: 100 Description: Less than one week Enabled: Selected Value: 200 Description: One week to one month Enabled: Selected Value: 300 Description: One month to one year Enabled: Selected Value: 400 Description: More than one year Enabled: Selected 10 Save your work. After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving.
Practice 5-2
Practice 5-2 Instructions Scenario This practice reinforces the concept of global segments for a descriptive flexfield and demonstrates the use of the None validation type. In this scenario, you will define a descriptive flexfield to track the following information about employees: The person who referred the employee Height Weight Step 1: Define Value Sets Use the Value Sets window to define three value sets as follows: Define an independent value set named XX_WHO_REFER. Give the value set a description, a format type of Char, and a maximum size of 15. Enable security for the value set. Define a value set of validation type None named XX_EMP_HEIGHT. Give the value set a description, a format type of Number, a maximum size of 4, and a precision of 2. Define a value set of validation type None named XX_EMP_WEIGHT. Give the value set a description, a format type of Number, a maximum size of 3, a precision of 0, a minimum value of 90, and a maximum value of 999.
Copyright Oracle Corporation, 2000. All rights reserved.
Step 2: Define the Structure (Segments) After defining your value sets, use the Descriptive Flexfield Segments window to define the structure for your descriptive flexfield. For the purposes of this practice, use the same descriptive flexfield that you worked on previously to enter your new structure. Unfreeze the flexfield definition first so that you can change the structure. Delete the segments that you defined previously, and define three new segments for the Global Data Elements context. Define a segment named Who Referred, with a prompt of Who. Assign the segment the number 10, the column ATTRIBUTE1, and the value set XX_WHO_REFER. Define a segment named Height, with a prompt of Height. Assign the segment the number 20, the column ATTRIBUTE2, and the value set XX_EMP_HEIGHT. Define a segment named Weight, with a prompt of Weight. Assign the segment the number 30, the column ATTRIBUTE3, and the value set XX_EMP_WEIGHT. Ensure that all three segments are displayed and enabled. When you finish defining the structure, freeze and compile your flexfield definition. Step 3: Define Values After defining the value sets and segments for your flexfield, use the Segment Values window to define the values associated with the independent value set. Define and enable the following values for the XX_WHO_REFER value set. Value: 100 Description: President Value: 200 Description: Executive Vice President
Value: 300 Description: Senior Vice President After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving. Practice 5-2 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_WHO_REFER
Description: XX Who Refer Value Set Security Available: Selected Format Type: Char Maximum Size: 15 Validation Type: Independent 3 Save your work. 4 Enter the information for the second value set in the following fields: Value Set Name: XX_EMP_HEIGHT Description: XX Employee Height Value Set Format Type: Number Maximum Size: 4 Precision: 2 Validation Type: None Note: You cannot enable security for a value set of validation type None. 5 Save your work. 6 Enter the information for the third value set in the following fields: Value Set Name: XX_EMP_WEIGHT Description: XX Employee Weight Value Set Format Type: Number Maximum Size: 3 Precision: 0 Min Value: 90 Max Value: 999 Validation Type: None 7 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Descriptive Flexfield Segments window. System Administrator: (N) Application>Flexfield> Descriptive>Segments 2 Query your descriptive flexfield. 3 Clear the Freeze Flexfield Definition check box. 4 In the Context Field Values region, select the Global Data Elements context and click the Segments button to navigate to the Segments Summary window. 5 Delete the segments that you defined previously. 6 Save your work. 7 Enter the information for the first segment in the following fields: Number: 10
Name: Who Referred Window Prompt: Who Column: ATTRIBUTE1 Value Set: XX_WHO_REFER Displayed: Selected Enabled: Selected 8 Save your work. 9 Enter the information for the second segment in the following fields: Number: 20 Name: Height Window Prompt: Height Column: ATTRIBUTE2 Value Set: XX_EMP_HEIGHT Displayed: Selected Enabled: Selected 10 Save your work. 11 Enter the information for the third segment in the following fields: Number: 30 Name: Weight Window Prompt: Weight Column: ATTRIBUTE3 Value Set: XX_EMP_WEIGHT Displayed: Selected Enabled: Selected 12 Save your work. 13 Navigate back to the Descriptive Flexfield Segments window. 14 Select the Freeze Flexfield Definition check box. 15 Click the Compile button to compile the flexfield definition. Step 3: Define Values 1 Navigate to the Segment Values window. System Administrator: (N) Application>Validation>Values 2 In the Find window, select Value Set and find the XX_WHO_REFER value set. 3 In the Values, Effective region of the Segment Values window, define the following values: Value: 100 Description: President Enabled: Selected
Value: 200 Description: Executive Vice President Enabled: Selected Value: 300 Description: Senior Vice President Enabled: Selected 4 Save your work. After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving.
Practice 5-3
Practice 5-3 Instructions Scenario In this practice, you will set up a context-sensitive segment and create a tablevalidated value set. By using context sensitivity, you increase the number of questions you can ask without increasing the number of columns in the table. In this scenario, you will track additional information for a transaction based on whether or not the transaction is a project. If it is not a project, then you do not need to capture additional information. If it is a project, then the flexfield should track the salesperson, the salespersons region, and the project name. To avoid some repetitive data entry, you will use a table that already exists within Oracle Applications to validate the project name. Step 1: Define Value Sets Use the Value Sets window to define three value sets. Define an independent value set named XX_SALES_REP. Give the value set a description, a format type of Char, and a maximum size of 3. Specify that the values must be uppercase only, and enable security for the value set. Define an independent value set named XX_LOCATION. Give the value set a description, a format type of Char, and a maximum size of 3. Specify that the values must be uppercase only, and enable security for the value set.
Define a table-validated value set named XX_PROJECT. Give the value set a description, a format type of Char, and a maximum size of 30. Enable security for the value set. Specify AR_CUSTOMERS_V in the Oracle Receivables application as the validation table. Assign the Value column the column name CUSTOMER_NUMBER, a type of Char, and a size of 30. Assign the Meaning column the column name CUSTOMER_NAME, a type of Char, and a size of 50. Step 2: Define the Structure (Segments) After defining your value sets, use the Descriptive Flexfield Segments window to define the structure for your descriptive flexfield. For the purposes of this practice, use the same descriptive flexfield that you worked on previously to enter your new structure. Unfreeze the flexfield definition first so that you can change the structure. For the context field, enter the prompt Is this a project? Specify that a value is required and context override is allowed. Delete the segments that you defined previously for the Global Data Elements context. Define and enable a new context named Yes with the code Yes. Define three new segments for the Yes context. Define a segment named Sales Rep, with a prompt of Sales Rep. Assign the segment the number 10, the column ATTRIBUTE1, and the value set XX_SALES_REP. Define a segment named Location, with a prompt of Location. Assign the segment the number 20, the column ATTRIBUTE2, and the value set XX_LOCATION. Define a segment named Project, with a prompt of Project. Assign the segment the number 30, the column ATTRIBUTE3, and the value set XX_PROJECT. Ensure that all three segments are displayed and enabled. Define and enable another new context named No with the code No. When you finish defining the structure, freeze and compile your flexfield definition. Step 3: Define Values After defining the value sets and segments for your flexfield, use the Segment Values window to define the values associated with each of the independent value sets. Define and enable the following values for the XX_SALES_REP value set. Value: CJ Description: Charles Jefferson Value: AR Description: Ana Rodriguez
Value: PL Description: Philippe Lebeau Define and enable the following values for the XX_LOCATION value set. Value: NY Description: New York Value: MA Description: Madrid
Value: PA Description: Paris After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving. Practice 5-3 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_SALES_REP Description: XX Sales Rep Value Set Security Available: Selected Format Type: Char Maximum Size: 3 Uppercase Only: Selected Validation Type: Independent 3 Save your work. 4 Enter the information for the second value set in the following fields: Value Set Name: XX_LOCATION Description: XX Location Value Set Security Available: Selected Format Type: Char Maximum Size: 3 Uppercase Only: Selected Validation Type: Independent 5 Save your work. 6 Enter the information for the third value set in the following fields:
Copyright Oracle Corporation, 2000. All rights reserved.
Value Set Name: XX_PROJECT Description: XX Project Value Set Security Available: Selected Format Type: Char Maximum Size: 30 Validation Type: Table 7 Click the Edit Information button to navigate to the Validation Table Information window. 8 Enter Oracle Receivables as the table application and AR_CUSTOMERS_V as the table name. Note: AR_CUSTOMERS_V will not appear in the list of values because it has not been registered, but you can still use it for validation purposes. 9 In the Table Columns region, enter the following information for the Value column: Name: CUSTOMER_NUMBER Type: Char Size: 30 10 In the Table Columns region, enter the following information for the Meaning column: Name: CUSTOMER_NAME Type: Char Size: 50 11 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Descriptive Flexfield Segments window. System Administrator: (N) Application>Flexfield> Descriptive>Segments 2 Query your descriptive flexfield. 3 Clear the Freeze Flexfield Definition check box. 4 In the Context Field region, enter information in the following fields: Prompt: Is this a project? Value Required: Selected Override Allowed (Display Context): Selected 5 In the Context Field Values region, select the Global Data Elements context and click the Segments button to navigate to the Segments Summary window. 6 Delete the segments that you defined previously. 7 Save your work. 8 Navigate back to the Descriptive Flexfield Segments window.
Copyright Oracle Corporation, 2000. All rights reserved.
9 In the Context Field Values region, enter the following information for the first context: Code: Yes Name: Yes Description: Yes Enabled: Selected 10 Click the Segments button to navigate to the Segments Summary window. 11 Enter the information for the first segment in the following fields: Number: 10 Name: Sales Rep Window Prompt: Sales Rep Column: ATTRIBUTE1 Value Set: XX_SALES_REP Displayed: Selected Enabled: Selected 12 Save your work. 13 Enter the information for the second segment in the following fields: Number: 20 Name: Location Window Prompt: Location Column: ATTRIBUTE2 Value Set: XX_LOCATION Displayed: Selected Enabled: Selected 14 Save your work. 15 Enter the information for the third segment in the following fields: Number: 30 Name: Project Window Prompt: Project Column: ATTRIBUTE3 Value Set: XX_PROJECT Displayed: Selected Enabled: Selected 16 Save your work. 17 Navigate back to the Descriptive Flexfield Segments window. 18 In the Context Field Values region, enter the following information for the second context: Code: No
Copyright Oracle Corporation, 2000. All rights reserved.
Name: No Description: No Enabled: Selected 19 Save your work. 20 Select the Freeze Flexfield Definition check box. 21 Click the Compile button to compile the flexfield definition. Step 3: Define Values 1 Navigate to the Segment Values window. System Administrator: (N) Application>Validation>Values 2 In the Find window, select Value Set and find the XX_SALES_REP value set. 3 In the Values, Effective region of the Segment Values window, define the following values: Value: CJ Description: Charles Jefferson Enabled: Selected Value: AR Description: Ana Rodriguez Enabled: Selected Value: PL Description: Philippe Lebeau Enabled: Selected 4 Save your work. 5 Select Value Set and find the XX_LOCATION value set. 6 In the Values, Effective region, define the following values: Value: NY Description: New York Enabled: Selected Value: MA Description: Madrid Enabled: Selected Value: PA Description: Paris Enabled: Selected 7 Save your work.
Copyright Oracle Corporation, 2000. All rights reserved.
After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving.
Practice 5-4
Practice 5-4 Instructions Scenario In this practice, you will create a dependent value set to validate a descriptive flexfield segment. The descriptive flexfield will track the country and region for a salesperson. The list of values for the region segment will change depending on the country that is selected. Remember that when defining a dependent value set, you must perform these steps in this order: 1 Define the independent value set. 2 Define the dependent value set. 3 Define independent values. 4 Define dependent values. Step 1: Define Value Sets Use the Value Sets window to define two value sets. Define an independent value set named XX_COUNTRY. Give the value set a description, a format type of Char, and a maximum size of 3. Specify that the values must be uppercase only, and enable security and Longlist for the value set. Define a dependent value set named XX_REGION. Give the value set a description, a format type of Char, and a maximum size of 3. Specify that the values must be uppercase only, and enable security for the value set.
Copyright Oracle Corporation, 2000. All rights reserved.
Associate the dependent value set with the independent value set XX_COUNTRY. Assign the dependent value set a dependent default value of XX, and give the default value a description. Step 2: Define the Structure (Segments) After defining your value sets, use the Descriptive Flexfield Segments window to define the structure for your descriptive flexfield. For the purposes of this practice, use the same descriptive flexfield that you worked on previously to enter your new structure. Unfreeze the flexfield definition first so that you can change the structure. For the context field, change the prompt back to Context. Specify that no value is required and context override is not allowed. Disable the Yes and No contexts that you defined previously, and delete the segments that you defined for the Yes context. Define two new segments for the Global Data Elements context. Define a segment named Country Code, with a prompt of Country. Assign the segment the number 10, the column ATTRIBUTE1, and the value set XX_COUNTRY. Define a segment named Region Code, with a prompt of Region. Assign the segment the number 20, the column ATTRIBUTE2, and the value set XX_REGION. Ensure that both segments are displayed and enabled. When you finish defining the structure, freeze and compile your flexfield definition. Step 3: Define Values After defining the value sets and segments for your flexfield, use the Segment Values window to define the values associated with the independent and dependent value sets. Define and enable the following values for the XX_COUNTRY value set. Value: USA Description: United States Value: CAN Description: Canada Value: UK Description: United Kingdom Define and enable the following values in the XX_REGION value set for the independent value USA. Value: OK Description: Oklahoma Value: TX Description: Texas
Copyright Oracle Corporation, 2000. All rights reserved.
Value: WI Description: Wisconsin Define and enable the following values in the XX_REGION value set for the independent value CAN. Value: SAS Description: Saskatchewan Value: BC Description: British Columbia Value: YT Description: Yukon Territory Define and enable the following values in the XX_REGION value set for the independent value UK. Value: WA Description: Wales Value: SL Description: Scotland
Value: EN Description: England After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving. Practice 5-4 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_COUNTRY Description: XX Country Value Set Security Available: Selected Enable Longlist: Selected Format Type: Char Maximum Size: 3 Uppercase Only: Selected
Validation Type: Independent 3 Save your work. 4 Enter the information for the second value set in the following fields: Value Set Name: XX_REGION Description: XX Region Value Set Security Available: Selected Format Type: Char Maximum Size: 3 Uppercase Only: Selected Validation Type: Dependent 5 Click the Edit Information button to navigate to the Dependent Value Set Information window. 6 In the Independent Value Set region, enter XX_COUNTRY in the Name field. 7 In the Dependent Default Value region, enter XX in the Value field and XX Region Default in the Description field. 8 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Descriptive Flexfield Segments window. System Administrator: (N) Application>Flexfield> Descriptive>Segments 2 Query your descriptive flexfield. 3 Clear the Freeze Flexfield Definition check box. 4 In the Context Field region, enter information in the following fields: Prompt: Context Value Required: Cleared Override Allowed (Display Context): Cleared 5 In the Context Field Values region, clear the Enabled check box for the Yes context and the No context. 6 Select the Yes context and click the Segments button to navigate to the Segments Summary window. 7 Delete the segments that you defined previously. 8 Save your work. 9 Navigate back to the Descriptive Flexfield Segments window. 10 In the Context Field Values region, select the Global Data Elements context and click the Segments button to navigate to the Segments Summary window. 11 Enter the information for the first segment in the following fields: Number: 10 Name: Country Code
Copyright Oracle Corporation, 2000. All rights reserved.
Window Prompt: Country Column: ATTRIBUTE1 Value Set: XX_COUNTRY Displayed: Selected Enabled: Selected 12 Save your work. 13 Enter the information for the second segment in the following fields: Number: 20 Name: Region Code Window Prompt: Region Column: ATTRIBUTE2 Value Set: XX_REGION Displayed: Selected Enabled: Selected 14 Save your work. 15 Navigate back to the Descriptive Flexfield Segments window. 16 Select the Freeze Flexfield Definition check box. 17 Click the Compile button to compile the flexfield definition. Step 3: Define Values 1 Navigate to the Segment Values window. System Administrator: (N) Application>Validation>Values 2 In the Find window, select Value Set and find the XX_COUNTRY value set. 3 In the Values, Effective region of the Segment Values window, define the following values: Value: USA Description: United States Enabled: Selected Value: CAN Description: Canada Enabled: Selected Value: UK Description: United Kingdom Enabled: Selected 4 Save your work. 5 Select Value Set and find the XX_REGION value set and the independent value USA.
Copyright Oracle Corporation, 2000. All rights reserved.
6 In the Values, Effective region, define the following values: Value: OK Description: Oklahoma Enabled: Selected Value: TX Description: Texas Enabled: Selected Value: WI Description: Wisconsin Enabled: Selected 7 Save your work. 8 Select Value Set and find the XX_REGION value set and the independent value CAN. 9 In the Values, Effective region, define the following values: Value: SAS Description: Saskatchewan Enabled: Selected Value: BC Description: British Columbia Enabled: Selected Value: YT Description: Yukon Territory Enabled: Selected 10 Save your work. 11 Select Value Set and find the XX_REGION value set and the independent value UK. 12 In the Values, Effective region, define the following values: Value: WA Description: Wales Enabled: Selected Value: SL Description: Scotland Enabled: Selected
Value: EN Description: England Enabled: Selected 13 Save your work. After defining your value sets, segments, and values, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving.
Summary
Summary Summary
Descriptive Descriptive flexfields flexfields gather gather additional additional information. information. Design Design the the descriptive descriptive flexfield flexfield to to support support the the different different needs needs of of different different users. users. Define Define flexfield flexfield level level attributes. attributes. Define Define global global segments segments for for the the Global Global Data Data Elements Elements structure. structure. Define Define a a reference reference or or context context field field if if using using different different contexts. contexts. Define Define a a structure structure for for each each context context containing containing the the segments appropriate for that context. segments appropriate for that context. Freeze Freeze and and compile compile the the finished finished definition. definition.
Summary This lesson discussed how to plan a descriptive flexfield. Descriptive flexfields gather additional information beyond that gathered by Oracle Applications. Not all users of the same descriptive flexfield need the same information. Descriptive flexfields can be customized so that each user sees only the information needed. Once you have planned the structure of your descriptive flexfield, the actual definition process is straightforward. If this flexfield uses any new value sets, plan those first. Define the flexfield header attributes. Define all global segments for the Global Data Elements structure. If you are using multiple contexts, define either a reference field on the base window, or a context field on the flexfield itself to control which context structure appears. For each context, define a structure containing the segments appropriate for that context. When you have finished defining all your structures and segments, freeze your definition and compile the flexfield. This makes the flexfield available for others to use.
Objectives
Objectives Objectives
After After completing completing this this lesson, lesson, you you should should be be able able to to do do the the following: following: Use Use values values retrieved retrieved from from application application tables tables for for validating input validating input Reference Reference profile profile options options when when validating validating input input
Use Use another another field field on on the the same same form form for for validation validation Use Use a a value value from from a a previously previously used used value value set set for for validation validation
Lesson Topics A previous lesson discussed creating and using value sets to check user input. You performed practices in which you defined value sets of the validation types None, Independent, and Dependent. In this lesson, you will learn how to use values stored in applications tables for validation. You will also learn how to restrict the set of values that is returned from the table. At the end of this lesson, you should be able to: Use values retrieved from application tables for validating input Reference profile option values when validating input Use a value from another field on the same form for validation Use the value from a previously used value set for validation
Overview
Overview Overview
Using Using table table validated validated value value sets sets Using Using profile profile option option values values for for validating validating Using Using the the value value from from a a prior prior field field on on a a form form Using Using the the value value from from a a prior prior value value set set
Overview There are several advanced techniques you can use when defining value sets for validating input. These techniques use values obtained from a location other than a list specifically defined for the value set. These locations include: Values retrieved from an application table The current value for a particular profile option A value used earlier in a field on the form A value used earlier in another value set
Using Advanced Validation Capabilities Besides obtaining values from an application table, you can obtain other values for validation from: Current profile options A prior field on the same form A prior value set used by a segment on the same form
Region
Western Eastern Eastern Southern Western
City
San Jose Boston Chicago Charleston Denver
San Jose
Denver
Using Existing Values in Application Tables for Validation Use the values stored in application tables to provide values to flexfield segments and report parameters. You can use an SQL WHERE clause to restrict the set of values returned. Remember the Longlist feature for large tables. Dependent value sets cannot use a table-validated value set as their Independent value set. Avoiding Double Maintenance Values stored in application tables are maintained by the application. Table validation is especially useful when values already exist in feeder systems.
Table Table Name Name Table Columns Table Columns Value Value Meaning Meaning ID ID
(N) (N) Application>Validation>Set Application>Validation>Set (B) (B) Edit Edit Information Information
Defining a Table-Validated Value Set Match the format options to the values stored in the table when defining tablevalidated value sets. Specify which table and which columns to use for this value set in the Validation Table Information window. Value Column - Specify the name, type, and size of the column containing the values to be used for validating. The list of values limits itself to columns matching the format choices made in the Value Sets window. Meaning Column - This column contains the descriptions for the values in the Value column. Hidden ID Column - This contains non-displayed values, for example, an application ID number corresponding to the displayed application name. Many Oracle Applications key flexfields do not allow the use of the hidden ID column. Additional Columns - Any additional columns to display. You can use a column alias to provide a title for the column. Include a width indicator for the column. For example: user_formname Form Title(30), application_name Application Name(35)
Restricting Restricting Values Values Retrieved Retrieved from from a a Table Table
If If not not all all the the values values stored stored in in the the table table are are appropriate appropriate for for your your value value set, set, use use a a SQL SQL WHERE WHERE clause to restrict the set of values returned clause to restrict the set of values returned from from the the table. table. You You can can also also use use an an ORDER ORDER BY BY statement statement to to control the order in which the values control the order in which the values are are returned. returned.
Limitations Limitations on on Using Using SQL SQL WHERE WHERE Clauses Clauses
Do Do not not use use WHERE WHERE clauses clauses with with the the Accounting Accounting Flexfield. Flexfield. Do Do not not use use HAVING HAVING or or GROUP GROUP BY BY clauses. clauses. Do Do not not use use UNION, UNION, INTERSECT, INTERSECT, MINUS, MINUS, PLUS, PLUS, or or other set operators except in a subquery. other set operators except in a subquery. If If you you need need a a complex complex SQL SQL clause clause to to select select your your values from a table, you should instead values from a table, you should instead first first define define a a view view over over the the table table which which selects selects the the rows rows you you need, need, and and then then define define the the value value set set over over the the view. view.
Using Using Multiple Multiple Tables Tables for for Validation Validation
Specify Specify more more than than one one name name in in the the Table Table Name Name field. field.
No No value value is is required required in in the the Table Table Application Application field. field. Use Use the the JOIN JOIN statement statement in in the the WHERE WHERE clause clause to to use use columns columns from from multiple multiple tables. tables. Use Use regular regular SQL SQL syntax syntax to to specify specify the the table table join. join.
Practice 6-1
Practice 6-1 Instructions Scenario In this practice, you will use an application table to validate a descriptive flexfield segment. You will create a table-validated value set to validate employee numbers based on a Human Resources application table called PER_ALL_PEOPLE_F. Then you will add an additional segment to the descriptive flexfield structure you defined in Practice 5-4 to track the salespersons employee number. Step 1: Define a Value Set Use the Value Sets window to define a table-validated value set named XX_EMP_NUM. Give the value set a description, a format type of Char, and a maximum size of 30. Enable security and Longlist for the value set. Specify the table PER_ALL_PEOPLE_F in the Oracle Human Resources application as the validation table. Assign the Value column the column name EMPLOYEE_NUMBER, a type of Varchar2, and a size of 30. Assign the Meaning column the column name FULL_NAME, a type of Varchar2, and a size of 240. Restrict the value set to include only active employees by specifying the following Where/Order By clause: WHERE CURRENT_EMPLOYEE_FLAG = Y Step 2: Define the Structure (Segment)
After defining your value set, use the Descriptive Flexfield Segments window to define the structure for your descriptive flexfield. For the purposes of this practice, use the same descriptive flexfield that you worked on previously to enter your new structure. Unfreeze the flexfield definition first so that you can change the structure. You can keep the two segments that you defined previously for the Global Data Elements context. Now define a new segment for the Global Data Elements context. Name the segment Employee Number, with a prompt of Employee Number. Assign the segment the number 30, the column ATTRIBUTE3, and the value set XX_EMP_NUM. Ensure that the new segment is displayed and enabled. When you finish defining the structure, freeze and compile your flexfield definition. After defining your value set and segment, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving. Practice 6-1 Solutions Step 1: Define a Value Set 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the value set in the following fields: Value Set Name: XX_EMP_NUM Description: XX Employee Number Value Set Security Available: Selected Enable Longlist: Selected Format Type: Char Maximum Size: 30 Validation Type: Table 3 Click the Edit Information button to navigate to the Validation Table Information window. 4 Use the lists of values in the Table Application and Table Name fields to select Oracle Human Resources as the table application and PER_ALL_PEOPLE_F as the table name. 5 In the Table Columns region, use the lists of values in the following fields to select this information for the Value column: Name: EMPLOYEE_NUMBER Type: Varchar2 Size: 30 6 In the Table Columns region, use the lists of values in the following fields to select this information for the Meaning column: Name: FULL_NAME Type: Varchar2
Size: 240 7 In the Where/Order By field, enter WHERE CURRENT_EMPLOYEE_FLAG = Y 8 Save your work. Step 2: Define the Structure (Segment) 1 Navigate to the Descriptive Flexfield Segments window. System Administrator: (N) Application>Flexfield> Descriptive>Segments 2 Query your descriptive flexfield. 3 Clear the Freeze Flexfield Definition check box. 4 In the Context Field Values region, select the Global Data Elements context and click the Segments button to navigate to the Segments Summary window. 5 Keep the two segments that you defined previously. 6 Enter the information for the third segment in the following fields: Number: 30 Name: Employee Number Window Prompt: Employee Number Column: ATTRIBUTE3 Value Set: XX_EMP_NUM Displayed: Selected Enabled: Selected 7 Save your work. 8 Navigate back to the Descriptive Flexfield Segments window. 9 Select the Freeze Flexfield Definition check box. 10 Click the Compile button to compile the flexfield definition. After defining your value set and segment, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving.
References References the the current current value value of of a a profile option profile option References References the the value value of an earlier of an earlier appearing appearing field field on on the the same same form form References References the the value value from from a a value value set set used used earlier on the same earlier on the same form form
Other Advanced Validation Options Using $PROFILES$ You can reference the current value of a profile option in a WHERE clause by prefixing the name of the profile option with $PROFILES$. For example: :$PROFILES$.profile_option_name Using :Block.field You can test against the value of a prior field on the same form in a WHERE clause by referring to the field using the format Block_name.field_name. To find out the block and field names, click in the field and then select Help >Tool>Examine from the menu bar. This displays the block name and the field name for the selected field. Using $FLEX$ You can refer to the current value of a previously used value set on the same form by using $FLEX$.value_set_name.
Using $PROFILES$
Using :block.field
Using :block.field to Refer to a Field on the Base Window Use this value set only with flexfields on windows that have the same block.field available. If the list of values cannot find the correct field, the segment cannot accept any value as valid. Do not use this value set with flexfields appearing on other windows or with report parameters. This argument requires the same :block.field on every window where a value set based on this validation table could be used. For example, if the flexfield whose segment uses block.field validation appears on seven different windows, the same block.field must also be present on those seven forms. If sharing value sets among multiple descriptive flexfields, all windows that use any of those flexfields must have this block.field.
Using $FLEX$
Using $FLEX$ to Refer to a Value Used in a Previous Value Set The flexfield segment or report parameter always uses the value from the Value column (not the Meaning or Hidden columns). Because Value_set_name is case-sensitive, you must ensure that the name in the WHERE clause exactly matches the value set name defined. Use only letters, numbers, and underscores in value set names if you want to use them with $FLEX$. Do not use quotes, spaces, or other special characters in these value set names. The value set must point to a previous segment in the same flexfield structure. For descriptive flexfield context-sensitive segments, the value set must point to the previous segment in the same context-sensitive structure. Multiple $FLEX$.value_set_name statements can be used in the same WHERE clause.
Using Cascading Dependencies You can use the $FLEX$ keyword to create chains of validation checks called cascading dependencies.
Practice 6-2
Practice 6-2 Instructions Scenario In this practice, you will create a descriptive flexfield that uses cascading dependencies to validate the values entered. The flexfield will track the manufacturer, model, and color of a vehicle. The possible model values will be restricted depending on the manufacturer value, and the possible color values will be restricted depending on the model value. To set up the cascading dependencies, you will create table-validated value sets using the following tables: CAR_MAKERS MANUFACTURER_ MANUFACTURER_ MANUFACTURER_ NAME DESCRIPTION ID Ford Ford 01 Nissan Nissan 02 Chevrolet Chevrolet 03 Chrysler Chrysler 04 CAR_MODELS MODEL_ MODEL_ NAME DESCRIPTION Mustang Mustang
MODEL_ ID 011
MANUFACTURER_ ID 01
01 02 02 03 03 04 04
CAR_COLORS COLOR_ COLOR_ NAME DESCRIPTION Red Red Black Black Green Green Black Black Blue Blue White White Champagne Champagne Red Red Sea Green Sea Green Silver Silver Gold Gold Teal Teal Black Black Red Red Yellow Yellow Purple Purple Blue Blue Green Green Maroon Maroon Silver Silver Green Green White White Blue Blue Silver Silver
COLOR_ ID 0101 0102 0103 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124
MODEL_ ID 011 011 011 012 012 012 013 013 013 014 014 014 015 015 015 016 016 016 017 017 017 018 018 018
MANUFACTURER_ ID 01 01 01 01 01 01 02 02 02 02 02 02 03 03 03 03 03 03 04 04 04 04 04 04
Step 1: Define Value Sets Use the Value Sets window to define three value sets. Define a table-validated value set named XX_MFG. Give the value set a description, a format type of Char, and a maximum size of 10. Enable security for the value set. Specify the table CAR_MAKERS as the validation table. Assign the Value column the column name MANUFACTURER_NAME, a type of
Copyright Oracle Corporation, 2000. All rights reserved.
Varchar2, and a size of 10. Assign the Meaning column the column name MANUFACTURER_DESCRIPTION, a type of Varchar2, and a size of 30. Assign the ID column the column name MANUFACTURER_ID, a type of Number, and a size of 2. Define a table-validated value set named XX_MODEL. Give the value set a description, a format type of Char, and a maximum size of 10. Enable security for the value set. Specify the table CAR_MODELS as the validation table. Assign the Value column the column name MODEL_NAME, a type of Varchar2, and a size of 10. Assign the Meaning column the column name MODEL_DESCRIPTION, a type of Varchar2, and a size of 30. Assign the ID column the column name MODEL_ID, a type of Number, and a size of 3. Specify the following Where/Order By clause: WHERE MANUFACTURER_ID = :$FLEX$.XX_MFG Define a table-validated value set named XX_COLOR. Give the value set a description, a format type of Char, and a maximum size of 10. Enable security for the value set. Specify the table CAR_COLORS as the validation table. Assign the Value column the column name COLOR_NAME, a type of Varchar2, and a size of 10. Assign the Meaning column the column name COLOR_DESCRIPTION, a type of Varchar2, and a size of 30. Assign the ID column the column name COLOR_ID, a type of Number, and a size of 4. Specify the following Where/Order By clause: WHERE MODEL_ID = :$FLEX$.XX_MODEL ORDER BY COLOR_NAME Step 2: Define the Structure (Segments) After defining your value sets, use the Descriptive Flexfield Segments window to define the structure for your descriptive flexfield. For the purposes of this practice, use the same descriptive flexfield that you worked on previously to enter your new structure. Unfreeze the flexfield definition first so that you can change the structure. Delete the segments that you defined previously for the Global Data Elements context. Then define three new segments for the Global Data Elements context. Define a segment named Manufacturer, with a prompt of Manufacturer. Assign the segment the number 10, the column ATTRIBUTE1, and the value set XX_MFG. Define a segment named Model, with a prompt of Model. Assign the segment the number 20, the column ATTRIBUTE2, and the value set XX_MODEL. Define a segment named Color, with a prompt of Color. Assign the segment the number 30, the column ATTRIBUTE3, and the value set XX_COLOR. Ensure that all three segments are displayed and enabled. When you finish defining the structure, freeze and compile your flexfield definition.
Copyright Oracle Corporation, 2000. All rights reserved.
After defining your value sets and segments, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving. Practice 6-2 Solutions Step 1: Define Value Sets 1 Navigate to the Value Sets window. System Administrator: (N) Application>Validation>Set 2 Enter the information for the first value set in the following fields: Value Set Name: XX_MFG Description: XX Car Manufacturers Value Set Security Available: Selected Format Type: Char Maximum Size: 10 Validation Type: Table 3 Click the Edit Information button to navigate to the Validation Table Information window. 4 Enter CAR_MAKERS as the table name. 5 In the Table Columns region, enter the following information for the Value column: Name: MANUFACTURER_NAME Type: Varchar2 Size: 10 6 In the Table Columns region, enter the following information for the Meaning column: Name: MANUFACTURER_DESCRIPTION Type: Varchar2 Size: 30 7 In the Table Columns region, enter the following information for the ID column: Name: MANUFACTURER_ID Type: Number Size: 2 8 Save your work. 9 Enter the information for the second value set in the following fields: Value Set Name: XX_MODEL Description: XX Car Models Value Set Security Available: Selected Format Type: Char Maximum Size: 10
Copyright Oracle Corporation, 2000. All rights reserved.
10 11 12
13
14
15 16 17
18 19 20
21
Validation Type: Table Click the Edit Information button to navigate to the Validation Table Information window. Enter CAR_MODELS as the table name. In the Table Columns region, enter the following information for the Value column: Name: MODEL_NAME Type: Varchar2 Size: 10 In the Table Columns region, enter the following information for the Meaning column: Name: MODEL_DESCRIPTION Type: Varchar2 Size: 30 In the Table Columns region, enter the following information for the ID column: Name: MODEL_ID Type: Number Size: 3 In the Where/Order By field, enter WHERE MANUFACTURER_ID = :$FLEX$.XX_MFG Save your work. Enter the information for the third value set in the following fields: Value Set Name: XX_COLOR Description: XX Car Colors Value Set Security Available: Selected Format Type: Char Maximum Size: 10 Validation Type: Table Click the Edit Information button to navigate to the Validation Table Information window. Enter CAR_COLORS as the table name. In the Table Columns region, enter the following information for the Value column: Name: COLOR_NAME Type: Varchar2 Size: 10 In the Table Columns region, enter the following information for the Meaning column: Name: COLOR_DESCRIPTION
Copyright Oracle Corporation, 2000. All rights reserved.
Type: Varchar2 Size: 30 22 In the Table Columns region, enter the following information for the ID column: Name: COLOR_ID Type: Number Size: 4 23 In the Where/Order By field, enter WHERE MODEL_ID = :$FLEX$.XX_MODEL ORDER BY COLOR_NAME 24 Save your work. Step 2: Define the Structure (Segments) 1 Navigate to the Descriptive Flexfield Segments window. System Administrator: (N) Application>Flexfield> Descriptive>Segments 2 Query your descriptive flexfield. 3 Clear the Freeze Flexfield Definition check box. 4 Select the Global Data Elements context and click the Segments button to navigate to the Segments Summary window. 5 Delete the segments that you defined previously. 6 Save your work. 7 Enter the information for the first segment in the following fields: Number: 10 Name: Manufacturer Window Prompt: Manufacturer Column: ATTRIBUTE1 Value Set: XX_MFG Displayed: Selected Enabled: Selected 8 Save your work. 9 Enter the information for the second segment in the following fields: Number: 20 Name: Model Window Prompt: Model Column: ATTRIBUTE2 Value Set: XX_MODEL Displayed: Selected Enabled: Selected 10 Save your work.
11 Enter the information for the third segment in the following fields: Number: 30 Name: Color Window Prompt: Color Column: ATTRIBUTE3 Value Set: XX_COLOR Displayed: Selected Enabled: Selected 12 Save your work. 13 Navigate back to the Descriptive Flexfield Segments window. 14 Select the Freeze Flexfield Definition check box. 15 Click the Compile button to compile the flexfield definition. After defining your value sets and segments, navigate to your descriptive flexfield and test the results of your work. When you are finished, exit without saving.
Summary
Summary Summary
Value Value sets sets can can use use values values from from application application tables tables for for validation. validation. Value Value sets sets can can use use values values from from profile profile options options for for validation. validation. Value Value sets sets can can use use values values from from a a previously previously used used field field or or value value set set for for validation. validation.
Summary Some value sets (for example, Independent and Dependent) have lists of approved values explicitly defined. Other types of value sets, however, can use values from other locations for validation. Using values from an application table is one example of these alternate locations. The current value of a profile option can also be used. The value from a previously appearing field on a form can be referenced as well. Finally, the value from a previously used value set can be used by all subsequent value sets.