Perform the following steps to set a default segment value:
If you want to set a default value for this segment, identify the type of value you need.
Your list contains only the default types that have formats that match your value set format type.
Valid types include:
| Constant | The default value can be any literal value. |
| Current Date | The default value is the current date in the format DD-MON-RR or DD-MON-YYYY, depending on the maximum size of the value set. If the maximum size is 9, the date format is DD-MON-RR. If the maximum size is 11, the date format is DD-MON-YYYY.. See the table below for Current Date default date formats for different value set format types. |
| Current Time | The default value is the current time or the current date and time, depending on the maximum size of the segment. See the table below for Current Time default date/time formats. |
| Field | The default value is the current value in the field you designate in the Default Value field. The field must be in the same form as the flexfield. |
| Profile | The default value is the current value of the user profile option defined in the Default Value field. |
| Segment | The default value is the value entered in a prior segment of the same flexfield window. |
| SQL Statement | The default value is determined by the SQL statement you define in the Default Value field. |
The following table lists Current Date default date formats for different value set format types.
Current Date Default Date Formats
| Value Set Format Type | Value Set Maximum Size | Date Format |
|---|---|---|
| Standard Date | 11 | User date format |
| Standard DateTime | 20 | User date/time format |
| Date | 11 | DD-MON-YYYY |
| Date | 9 | DD-MON-RR |
| Char | Greater than or equal to 11 | DD-MON-YYYY |
| Char | 9, 10 | DD-MON-RR |
The following table lists Current Time default date/time formats for different value set format types.
Current Time Default Date/Time Formats
| Value Set Format Type | Value Set Maximum Size | Date/Time Format |
|---|---|---|
| Standard DateTime | 20 | User date/time format |
| DateTime | 20 | DD-MON-YYYY HH24:MI:SS |
| DateTime | 18 | DD-MON-RR HH24:MI:SS |
| DateTime | 17 | DD-MON-YYYY HH24:MI |
| DateTime | 15 | DD-MON-RR HH24:MI |
| Time | 8 | HH24:MI:SS |
| Time | 5 | HH24:MI |
| Char | Greater than or equal to 20 | DD-MON-YYYY HH24:MI:SS |
| Char | 18, 19 | DD-MON-RR HH24:MI:SS |
| Char | 17 | DD-MON-YYYY HH24:MI |
| Char | 15, 16 | DD-MON-RR HH24:MI |
| Char | Between 8 and 14 (inclusive) | HH24:MI:SS |
| Char | Between 5 and 7 (inclusive) | HH24:MI:SS |
If you choose Current Date or Current Time, you skip the next field.
Attention: If you are using flexfields server-side validation, you cannot use form field references (:block.field). You must either remove your field references or turn off flexfields server-side validation using the profile option Flexfields:Validate on Server.
Enter a default value for the segment. Your flexfield automatically displays this default value in your segment when you enter your key flexfield window. You determine whether the default value is a constant or a context-dependent value by choosing the default type.
Your default value should be a valid value for your value set. Otherwise, when you use your flexfield for data entry, your flexfield displays an error message and does not use your invalid default value in your flexfield segment.
For each default type chosen in the Default Type field, the valid values for the Default Value field are:
| Constant | Enter any literal value for the default value. |
| Field | The default value is the current value in the field you specify here. The field must be in the same form as the flexfield. Use the format :block.field. The value of the field must be in the format of the displayed value for the segment. |
| Profile | The default value is the current value of the user profile option you specify here. Enter the profile option name, not the end-user name. The value of the profile option must be in the format of the displayed value of the segment. |
| Segment | The default value is the value entered in a prior segment of the same flexfield window. Enter the name of the segment whose value you want to copy. The default value can be one of three values associated with the prior segment. The three choices are: ID, VALUE, and MEANING. The ID is the hidden ID value for the segment. VALUE is the displayed value for the segment. MEANING is the description of the segment. To use the displayed value of the prior segment, specify segment_name.VALUE in this field. Specify segment_name.MEANING for the description of that segment. Specify segment_name.ID for the hidden ID value of the segment. If you specify segment_name only, the hidden ID value of the segment is the default value. For Standard Date and Standard DateTime value sets you should use segment_name.VALUE of the prior segment. |
| SQL Statement | The default value is determined by the SQL statement you enter here. Your SQL statement must return exactly one row and one column in all cases. |
For date values, the SQL statement must return the value in the correct displayed format. Use the FND_DATE package for date conversions.
Attention: If you are using flexfields server-side validation, you cannot use form field references (:block.field). You must either remove your field references or turn off flexfields server-side validation using the profile option Flexfields:Validate on Server.