!!Defining the Custom Function in the application

1. Go to [IMLN] and identify  the custom function in the [X_UC_FUNCTIONS] lexicon
* Saved Value is a unique 10 character code that is stored in the data base
** Best practice:  Use your customer code and a sequential number (i.e  ACME_01)
* Displayed Value is the Function Name as declared in the data base
* Meaning is the product that the Function is intended to be used with

2. Invoke the custom function in your usercalc using an Operand Type of CF (Custom Function)

!!Defining the Custom Function in the data base
1. The custom function must be named P2K_xxx_functionname  where xxx is the customer code.  This is especially important for Workflow oriented user calcs.

2. Create the function in the data base as a [data base function] returning VARCHAR or NUMBER or BOOLEAN (true/false)
* No parameters may be defined in this function
* Variables can be passed, however, by setting their value prior to calling the custom function and then referring to them within the function.
** Variables defined on the IMUC Variables tab are created in the usercalc as V_<''variable name''>
** example:  a Variable identified as __Current Month FTE__ will be identified as __V_CURRENT_MONTH_FTE__ in the SQL code
* If defining a PR usercalc you also have access to all the package variables that are used as part of the P2K_PMCALC package (see P2K_PMCALC_SPEC.SQL)
* You also have access to the P2K_PMUCUTIL package variables (see P2K_PMUCUTIL_SPEC.SQL)


----
![Notes|Edit:Internal.CREATE+A+USERCALC+CUSTOM+FUNCTION] 	
[{InsertPage page='Internal.CREATE+A+USERCALC+CUSTOM+FUNCTION' default='Click to create a new notes page'}]