You can pass parameters to a foreign function that is invoked from a user exit by defining user_exit_string and error_string in the USER_EXIT Built-in subprogram.
When you define user_exit_string and error_string in Oracle Forms, the foreign function recognizes the values as corresponding to a command line value and an error message value. For instance, Oracle Forms treats the value of user_exit_string as a string variable. The value of user_exit_string is the command line to a foreign function.
The following are foreign function parameters and their corresponding Oracle Forms definitions for each foreign function invoked from a user exit:
Foreign Function Parameter |
Oracle Forms Definition |
---|---|
Command Line |
user_exit_string. |
Command Line Length |
length (in characters) of user_exit_string. |
Error Message |
error_string. |
Error Message Length |
length (in characters) of error_string. |
In-Query |
a boolean value that reflects whether the foreign function was invoked from a user exit when the form was in Enter Query mode. |
Although Oracle Forms automatically invokes the foreign function from the user_exit_string, Oracle Forms does not automatically parse the user_exit_string. It is the responsibility of the foreign function to parse the user_exit_string.
You can pass any number of parameters to a foreign function from the user_exit_string of the USER_EXIT Built-in. Use this feature to pass information such as item names. For example, to pass two parameters, PARAM1 and PARAM2, to the CALCULATE_VALUES foreign function, you specify the following statement:
User_Exit('CALCULATE_VALUES PARAM1 PARAM2');