Understanding Event Rules Design

You can use JD Edwards EnterpriseOne Event Rules Design to create event rule (ER) logic for forms and controls on a form. For example, you want to pass data for a selected record on a find/browse form to a fix/inspect form to revise that record. You need to create a form interconnection ER and attach it to the Select button option for the Button Clicked event.

You can create event rules that perform a large variety of tasks, including:

  • Perform a mathematical calculation.

  • Pass data from a field on a form to a field on another form.

  • Count grid rows that are populated with data.

  • Interconnect two forms.

  • Hide or display a control using a system function.

  • Evaluate If/While and Else conditions.

  • Assign a value or an expression to a field.

  • Create variables or programmer-defined fields at runtime.

  • Perform a batch process upon completion of an interactive application.

  • Process table input and output, validate data, and retrieve records.

Before you create an ER, consider which control (form, button, field, grid and so on) you want to add the logic in and what event you want to add the logic for. Answer these questions to determine which event should be used:

  • Is the user initializing the form?

  • Is the user clicking a button?

  • Is the user exiting from a field?

  • Is the user changing or exiting from a row?

After you place controls on a form, you can add ERs to any of the event that the control support. Remember that a form is also a control, and you can create logic that the system automatically processes whenever a form event is fired.

You create ERs by clicking the buttons on the tool bar in JD Edwards EnterpriseOne Event Rules Design. Depending on the button that you click, a different work areas appear for creating and manipulating the ER line-by-line. Specific buttons enable you to perform these tasks:

  • Attach a business function or system function.

  • Create an If/While statement.

  • Insert an Else clause in an If statement.

  • Assign a value or expression.

  • Create a variable.

  • Create a form or report interconnection.

  • Perform table I/O.

  • Find a string in a given ER.

  • Add comments in the ER code.

  • Print the ER code.

You can cut or copy an ER and paste it in the same event, form, or application or in a different event, form, or application. You can also paste ERs into other applications, such as word processing documents. This feature is useful for documenting the project.

When you paste an ER, the system resolves objects from the source as you paste them. If an object is partially resolved, the system pastes the closest matching object from the destination ER. A comment line appears above the partially-resolved line of event rules and in the status bar to indicate that the object is partially resolved. You can set paste options to display comments before and after a block of pasted ERs. Some objects cannot be resolved in the destination ER. The system disables these lines of ER and displays a comment. For example, an EndIf statement is commented out if its associated If statement is missing.

For criteria statements, the paste operation adds whatever is necessary to maintain a clean, logical structure. For example, if you paste an If statement and no EndIf statement exists, the paste operation adds a matching EndIf statement to make the logic complete.

Use the System Function button to attach predefined system functions to events. For example, you can attach system functions to an event that perform these tasks:

  • Hide or display a control.

  • Display media objects.

You can attach an existing business function to an event. Business functions include these types of code:

  • C code that you generate manually (source language C).

  • Named Event Rules (NERs) (source language Event Rules).

You typically use business functions for these purposes:

  • Referential integrity, such as deleting secondary records when a master record is deleted, and for editing routines.

  • Large and complex calculations that might otherwise overload the runtime engine.