Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Using the Designer
  3. Working with Sources
  4. Working with Flat Files
  5. Working with Targets
  6. Mappings
  7. Mapplets
  8. Mapping Parameters and Variables
  9. Working with User-Defined Functions
  10. Using the Debugger
  11. Comparing Objects
  12. Managing Business Components
  13. Creating Cubes and Dimensions
  14. Using the Mapping Wizards
  15. Appendix A: Datatype Reference

Designer Guide

Designer Guide

Creating Expressions with User-Defined Functions

Creating Expressions with User-Defined Functions

You can add a user-defined function to an expression. If you enter a user-defined function when you manually create an expression, you must prefix the user-defined function with :UDF. When you create an expression with the Expression Editor, valid user-defined functions display on the User-Defined Functions tab. Use user-defined functions as you would any other function.
If you create a user-defined function, which is only usable in the Designer, the function only displays in the Designer.
When you select a user-defined function, the Expression Editor shows the function syntax in the following format:
<return datatype> <function name> (<argument 1> as <datatype>, <argument N> as <datatype>)
For example:
NSTRING RemoveSpaces(NAMES as string)
When you add the function to the Formula window, the function includes the prefix :UDF, as shown in the following example:
:UDF.RemoveSpaces( )
When you validate the expression,
CDI-PC
does not validate the user-defined function. It only validates the expression.

0 COMMENTS

We’d like to hear from you!