Understanding Smart Fields
Smart fields are reusable objects and can be used to minimize the creation of repetitive logic. Smart fields are data dictionary items with attached business functions. The business functions provide the smart field with the required logic. A smart field can have multiple business functions attached, each providing different functionality. For example, some smart fields calculate an amount and populate a column heading based on the time period that is used to calculate the amount. These smart fields must have at least two business functions attached to provide both functions.
Business functions are programs that use data structures to:
Request specific data from JD Edwards EnterpriseOne tables.
Return the data to the established parameters in the data structure.
Perform calculations or other manipulation on the data.
Send the desired information, such as column headings and complex calculations, to the report section.
Two types of business functions are available in JD Edwards EnterpriseOne:
C business functions.
You create C business functions in the C programming language. These business functions include two parts—a source file (.c), and a header file (.h).
Business function event rules.
Business function event rules are also known as named event rules (NER). You create NERs using the event-rules scripting language. This scripting language is platform-independent and is stored in a database as a JD Edwards EnterpriseOne object. When you build business function event rules, the system generates C code and creates corresponding .c and .h files.
NERs are similar to event rules that you create on a section of a report. Event rules that you create in a report are referred to as embedded event rules. While embedded event rules can be used only within the report in which they were created, NERs are created outside RDA and are reusable.
Several smart fields are shipped with JD Edwards EnterpriseOne. You can create custom smart fields to meet specific business needs. After smart fields are created, you can use them to include complex logic in report sections without having to do any programming.
For each smart field that you include in a section, you are prompted to define parameters that are specific to that smart field. The parameters are presented in the Director using a series of forms. Although the number and content of the forms vary based on the smart field, the process occurs in three phases:
First, you are prompted to define how you want the column to appear in the section.
Second, you are prompted to define parameters, such as period number offset, journal entry amount, and fiscal year offset.
Some smart fields have only one parameter and, therefore, only one form in this phase. Others have multiple parameters that you specify using a series of forms.
Third, you are prompted to filter the data that is presented in the section using data selection.