Defining Flexible Address Validation
Use the Flexible Address Formats feature to enter and validate addresses in country-specific formats. See: Flexible Addresses.
For each address style, you can define country-specific validation that controls the information you enter in certain address elements. For example, you may want to restrict the entry of cities for French addresses to a predefined list, or you may want to restrict a postal code to a certain range of numbers.
Validation can take the form of a simple list of values or a complex parent-child relationship between address elements. This section discusses how to implement list of value validation on your flexible address formats. Refer to the Oracle Applications Flexfields Guide for information on complex validation.
This section uses the Southern European address style for Spanish and French address entry to demonstrate how to set up a list of values on an address style. Assume that within this flexfield you want to have a list of values on the City field that will list either Spanish or French cities, depending upon the country of the address you are entering. For more information about the Southern European and other address styles, see: Address Style Mappings.
Prerequisites
To define flexible address format validation:
1. Decide which values you want to display in your list of values.
This example uses the following locations: France, Spain, Bordeaux, Barcelona, Lyon, Balboa, Paris, and Madrid.
2. Navigate to the Countries and Territories window.
3. Query the countries for which you wish to validate address information.
4. Note the two character short code which identifies each of the countries you want to validate against in the list of values.
The country codes for Spain and France are 'ES' and 'FR', respectively.
Attention: It is very important to identify the correct country code. Otherwise, the list of values will return no data for these countries and you will be unable to enter any information in the address element to which the value is assigned.
Warning: The address styles should be identical across all address flexfields. If they are not the same, you risk creating addresses that are incompatible with different windows.
Creating a valid list of values for address components
To create a valid list of values for each address component you wish to validate:
1. Using the Application Developer responsibility, navigate to the Special QuickCodes window.
2. Enter your new QuickCode Type.
The QuickCode should belong to the Application Object Library application and should have an Access Level of System.
You should name all of your flexible address QuickCodes consistently to avoid confusion. For example, FAF_<column_name>, where <column_name> is the name of the address column to which you are assigning the list of values choice. In this example you would call your QuickCode type FAF_CITY.
Attention: If more than one country uses a particular address style, you can only have one QuickCode type for each address element. For example, you can only have one City QuickCode type for all countries using the Northern European address style. It is advisable to adopt this policy for all QuickCode types, regardless of the number of countries using them, because they will be easier to maintain.
3. Enter a list of valid locations. You only need to enter three pieces of information: Language, Code, and Meaning.
The Code is a unique identifier which will enable the system to identify which city to select when it displays the list of values. Therefore, the Code column must be called <country_code><n>, where <country_code> is the two character short code for the country of the address information you are entering, and <n> is a sequential number which ensures the Code is unique.
4. Enter the actual information you wish to retrieve in the Meaning column.
In this example, the code and meaning values would look as follows:
|
ES1
| Barcelona
|
ES2
| Balboa
|
ES3
| Madrid
|
FR1
| Bordeaux
|
FR2
| Lyon
|
FR3
| Paris
|
Defining a value set
To define a value set that lists your location values:
1. Using the Application Developer responsibility, navigate to the Value Sets window.
2. Enter the name of your value set.
For example, FAF_<address_column>, where <address_column> is the name of the column that you will attach to the value set. In this example you would call your value set FAF_CITY.
3. Ensure that the Format Type and Maximum Size correspond to the type and size of the column you will be populating with this value set.
4. Set the Validation Type to Table.
5. Choose Edit Information.
6. Enter Application Object Library as the Table Application.
7. Enter FND_LOOKUP_VALUES as the Table Name.
8. Enter MEANING as the Value Column.
9. Enter the following statement in the WHERE / ORDER BY region:
WHERE LOOKUP_TYPE = '<QuickCode_name>'
AND SUBSTR(LOOKUP_CODE,1,2) =:WORLD.FAF_COUNTRY
In this example the following statement would be used:
WHERE LOOKUP_TYPE = 'FAF_CITY'
AND SUBSTR(LOOKUP_CODE,1,2) =:WORLD.FAF_COUNTRY
The field :WORLD.COUNTRY exists in all windows that use flexible addresses and contains the two character short code of the country of the address that you are currently entering. Using this short code enables you to develop country specific validation within a flexfield that can be used by many countries.
Assigning a value set to an address element
In this example, we will assign the value set to the City segment in the Southern European address style for the Site Address descriptive flexfield.
To assign a value set to the appropriate address element in the descriptive flexfield:
1. Using the Application Developer responsibility, navigate to the Descriptive Flexfield Segments window.
2. Query the appropriate address descriptive flexfield, then uncheck the Freeze Flexfield Definition check box.
The system provides the following address descriptive flexfields:
|
Bank Address
| Banks
|
Remit Address
| Remit-to Address, Customers
|
Check Address
| Payment Summary, Payment Overview
|
Site Address
| Suppliers
|
3. Navigate to the Context Field Values alternative region, then select the address style to which you are assigning the value set.
In this example the value set will be added to the Southern European address style.
4. Choose Segments, then select the relevant address segment.
In this example it is the City segment.
5. Enter the name of the Value Set that you created (in this example it is FAF_CITY).
6. Return to the Descriptive Flexfield window and check the Freeze Flexfield Definition check box.
8. Follow the above steps to set up the same validation for each address descriptive flexfield.
The address styles should be identical across all address flexfields. If they are not the same, you risk creating addresses that are incompatible with different windows.
Warning: Do not assign a value set to a flexfield if any of the countries using that flexfield do not have any data defined in the QuickCode. Using the list of values will return no data for these countries and you will be unable to enter any information in the address element on which the value set is used.
See Also
Flexible Addresses
Address Style Mappings
Setting Up Flexible Addresses
Creating Custom Address Styles
Entering Flexible Addresses
Maintaining Countries and Territories