Before you can capture and report to NFC properly formatted employee addresses, you must configure the personal address flexfield with the value sets for State, County, and City.
The City list of values includes only those cities within the United States. The State list of values includes the duty station codes and names for 50 US states, 7 territories (American Samoa, Federated States of Micronesia, Guam, Marshall Islands, Northern Mariana Islands, Palau, Virgin Islands) and for the AFO addresses (Armed Forces Americas, Armed Forces (Other), and Armed Forces Pacific).
When defining the address style you can optionally specify a default value for the county based on the state and city name. Note, however, that for cities that overlap two or more counties, the default value may not supply the one required by users. In these situations, users can choose the appropriate county from the list of values
Login with the Application Developer responsibility, and use the Descriptive Flexfield Segments window to specify value sets for the Personal Address Information.
In the title field, query the Personal Address Information for the US Federal Human Resources application.
In the Context Field Values, query the US_GLB code.
Deselect the Freeze Flexfield Definition so that you can make the following changes to the Personal Address Flexfield.
Click Segments to open the Segment Summary window and display the segment and value set information for the selected address style.
Rearrange the sequence for the City, State and County segments:
City segment: sequence number 4
State segment: sequence number 5
County segment: sequence number 6
Attach the following value sets to the City, State, and County segments:
City segment: GHR_US_CITIES
State segment: GHR_US_STATES
County segment: GHR_US_COUNTIES
Note: You must make the Country segment mandatory. Do not change the validation on any segment as this may invalidate existing data.
Save your work.
In the Segments Summary window, select the County segment, and click the Open button to display the Segments window.
In the Validation region Default Type field, choose SQL Statement.
In the Validation region Default Value field, paste the following information
select dut.name
from ghr_duty_stations_f dut,fnd_sessions fs
where dut.duty_station_code in
(select substr(dut1.duty_station_code,0,2)||'0000'||substr(dut1.duty_station_code,7,3)
from ghr_duty_stations_f dut1,ghr_duty_stations_f dut2,fnd_sessions fs1
where dut1.name=:$FLEX$.SS_CITIES and dut2.name in
(select upper(meaning)
from fnd_common_lookups fc
where fc.lookup_type = 'US_STATE' and lookup_code=:$FLEX$.SS_STATES
)
and substr(dut1.duty_station_code,0,2) = substr(dut2.duty_station_code,0,2)
and substr(dut2.duty_station_code,3,7) = '0000000'
and fs1.effective_date between dut1.effective_start_date and dut1.effective_end_date
and fs1.effective_date between dut2.effective_start_date and dut2.effective_end_date
and fs1.session_id = userenv('sessionid')
)
and fs.effective_date between dut.effective_start_date and dut.effective_end_date
and fs.session_id = userenv('sessionid')
Save your work.
In the Descriptive Flexfield Segments window, select the Freeze Flexfield Definition checkbox to prevent further changes.
Save your work.
Click Compile to compile the definition.
Save your work.