Example of Special Validation
Here is an example of how to use Special validation (an example for Pair validation follows this example). Suppose you want to let your users pass a single combination of concatenated Accounting Flexfield segments as a parameter to a report. To let your user choose a single combination, you must provide a key flexfield window from within the report parameters window on the Run Reports form. To do this, you simply define a value set with Special validation and use your familiar flexfield user exits. Since you want to pass an existing combination (that is, you want to pass the ID number of the combination) and this is a foreign key flexfield, you use VALIDATE=FULL and the ID=:!ID argument. You do not use the DATA_FIELD=:!ID argument. This example uses structure 101 of the Accounting Flexfield (though normally you might get your structure number from a prior segment or a profile option, depending on how you use your value set). You define your Events and Functions in this field as follows:
For data entry validation (Event = Edit), you would enter:
FND POPID
APPL_SHORT_NAME=SQLGL
CODE="GL#"
NUM=101
REQUIRED=Y
VALIDATE=FULL
ID=:!ID
SEG=:!VALUE
DESC=:!MEANING
NAVIGATE=!DIR
DINSERT=N
For data query (Event = Load), you would enter:
FND LOADID
APPL_SHORT_NAME=SQLGL
CODE="GL#"
NUM=101
REQUIRED=Y
VALIDATE=FULL
ID=:!ID
SEG=:!VALUE
DESC=:!MEANING
DINSERT=N
For data validation (Event = Validate), you would enter:
FND VALID
APPL_SHORT_NAME=SQLGL
CODE="GL#"
NUM=101
REQUIRED=Y
VALIDATE=FULL
ID=:!ID
SEG=:!VALUE
DESC=:!MEANING
DINSERT=N