Previous  Next          Contents  Index  Navigation  Glossary  Library

Defining Your Special Validation Function

Enter your user exit syntax exactly as you would call it from a form trigger, except that you need not include the # sign (that is, instead of entering #FND, you may enter just FND).

Special validation provides several special arguments you can use to pass values to and from your user exits:

:!ID

You can use :!ID to pass different information depending upon the circumstances. For flexfield routines, :!ID can pass either a combination ID number of an entire combination of segment values (key flexfields only), or it can pass a concatenated string of the individual flexfield segment values (either key or descriptive flexfields).

When you use :!ID to pass a concatenated string of individual segment values, :!ID should contain the hidden ID values, if any, of the values in your value sets. If your value set does not use a hidden ID column, :!ID contains the actual value from the value column of your value set.

For a foreign key flexfield where you are using the VALIDATE=FULL argument, you should use the ID=:!ID argument, and you should not use the DATA_FIELD=:!ID argument. If you are coding a foreign key flexfield where you are using the VALIDATE=PARTIAL (or NONE) argument, you should use the DATA_FIELD=:!ID argument and you must not use the ID=:!ID argument. Note that if you use the DATA_FIELD=:!ID argument for a key flexfield, you must ensure that the total length of the concatenated segments and their separators is less than 240 characters.

You cannot use ID=:!ID with the #FND POPIDR, LOADIDR, or VALIDR routines for range flexfields, but you may use the DATA_FIELD=:!ID argument.

If you have a Load event, you must use :!ID with either an ID field or data field. Your user exit passes the contents of :!ID to your report or flexfield instead of the contents of :!VALUE.

:!VALUE

You use :!VALUE to access the user's input. :!VALUE refers to the displayed values that appear in the flexfield window and in the concatenated values field. :!VALUE contains the concatenated values for the flexfield your value set uses. If you do not specify a value for :!ID, then :!VALUE is passed to your report or stored in your segment column.

If you have a Load event, you must use :!ID with either an ID field or data field. Your user exit passes the contents of :!ID to your report or flexfield instead of the contents of :!VALUE.

:!MEANING

You use :!MEANING to pass the concatenated descriptions of your flexfield values. The value description appears as usual next to the flexfield segment value and in the concatenated description field. If you are writing your own function, you should code your user exit to write the value description into :!MEANING.

!DIR

Use !DIR for the NAVIGATE argument of key and descriptive flexfields routines. !DIR allows the flexfields routines to determine the proper navigation direction when you use a flexfield as a segment value set. Do not use a colon when you specify !DIR for POPID or other flexfield routines.

Additional Arguments for Pair Value Sets

If you are defining validation for a Pair type value set but you are not using the flexfield routines #FND POPIDR, LOADIDR, or VALIDR for range flexfields, you may use special forms of these arguments: :!ID_LOW and :!ID_HIGH, :!VALUE_LOW and :!VALUE_HIGH, and :!MEANING_LOW and :!MEANING_HIGH. However, usually you should use the key flexfield routines for a range flexfield (POPIDR, LOADIDR, and VALIDR), and these routines add the _LOW and _HIGH suffixes to :!ID, :!VALUE and :!MEANING for you automatically.

DINSERT and Dynamic Inserts

When you use a key flexfield user exit for special validation, you must include the token DINSERT=N in your Edit, Load, and Validate events. You cannot perform dynamic inserts from a flexfield within a flexfield, even if the flexfield has dynamic inserts allowed.

Using Hidden IDs

Though you must use the ID=:!ID argument when you want to pass a key flexfield combination ID number, you could use either the DATA_FIELD=:!ID argument or the SEG=:!VALUE argument to pass concatenated key segment values. Even if the value sets your flexfield uses do not use hidden ID columns and values, you may want to write explicitly to the :!ID field (and define a Load event) so that it is clear which values you are storing in the database or passing to your report. If your value sets do not use hidden ID columns, :!ID contains the actual values from the value columns of your value sets. You can have a mixture of displayed values and hidden ID values (depending on which value sets your flexfield segments use) concatenated in :!ID. If you are passing information to an Oracle Reports report that uses flexfield routines, you must have a data field and use the DATA_FIELD=:!ID argument.

Hints for Using Special Validation

If your special (or pair) value set does not behave the way you expect, you should check your value set definition to be sure that you typed your function correctly. Common errors include misplaced exclamation marks ( ! ) and colons ( : ). You should check that these punctuation marks are not missing or in the wrong order or present when they should not be. Other common problems include misspelling token names, missing or extra apostrophes ( ' ), and missing or extra quotation marks ( " ).


         Previous  Next          Contents  Index  Navigation  Glossary  Library