Oracle by Example brandingUsing Form Control Extensions to Disable Fields

section 0Before You Begin

This 45-minute OBE (Oracle by Example) shows you how to create a logic extension with a Form Control function to disable fields and associate that logic extension to a form.

In this OBE, you will:

  • Create a logic extension with a form control extension to disable controls (fields) on a form for a particular version.
  • Associate the logic extensions to events on the form.
  • Test the logic extension.

Background

Forms are the fundamental components of EnterpriseOne interactive applications, and those forms are made up of various form controls, such as input fields, buttons, and grids. Logic extensions give designers the ability to extend the underlying processing logic in applications, for example, to manipulate numbers, dates, strings, and to read and write data to EnterpriseOne tables.

This feature enhances logic extensions with the ability to act on the properties of controls on the form, for example, to show, hide, enable, disable, or change the color of a field. For example, with form control extensions you could determine the value a user has entered in a field, and based on that value conditionally enable, disable, or highlight a different control. Being an enhancement to logic extensions, form control extensions are also user-defined objects, so they inherit all the ease of low code/no code development and deployment as with logic extensions.

What Do You Need?

To perform the steps in this OBE, you will need:

  • Access to a JD Edwards EnterpriseOne environment with Tools Release 9.2.7.4 or later. JD Edwards EnterpriseOne Trial Edition running on Oracle Cloud Infrastructure is suitable, but you can use any environment with the proper Tools release.
  • Access to the Orchestrator Studio and permissions to create orchestration and service request components, which are managed as user defined objects (UDO) in EnterpriseOne. See “Managing Orchestrator Studio Security” in the JD Edwards EnterpriseOne Tools Orchestrator Studio Guide.
  • Access and permission to the create Form Extension in EnterpriseOne, which is enabled through UDO feature security.

section 1Creating a Logic Extension to Disable Fields

In this section, you will learn how to create a logic extension with a form control extension to disable fields on the form for the ZJDEC002 version.

  1. Sign in to the JD Edwards EnterpriseOne Orchestrator Studio.
  2. Click Logic Extensions.
  3. Click the New button.
  4. In the Name field, enter Disable form controls for a version.
  5. In the Description field, enter Disable form controls for a version.
  6. Click Save.
  7. Click the Data Structure tab.
  8. To add a data dictionary item, click the +Data Dictionary button.
    The Data Dictionary window is displayed.
  9. In the Alias field, enter VERS and click the + button.
  10. Logic Extension - Data Structure
    Logic Extension - Data Dictionary
  11. For the Version data dictionary item, retain the IO Type as Input Only.
  12. Logic Extension - Data Structure
    Logic Extension - Data Structure Tab
  13. Click the +Add Control button and from the Data Type drop-down list, select Form Control List.
  14. Logic Extension - Data Structure Add Control
    Logic Extension - Data Structure Add Control 
  15. Click the Logic tab.
  16. First, we will add the If Else statement to the logic to check if “Version” is equal to "ZJDEC002".
    In the design panel, hover over the line between the Start and the End node and click the + icon.
  17. Logic Extension - Design Panel
    Logic Extension - Design Panel  
  18. Select If Else from the context menu. The If Else panel is displayed on the right.
    Note: You can also drag and drop the If Else statement from the Statements tab to the + icon between the Start and the End nodes in the design panel.
  19. Logic Extension - Design Panel If Else Statement
    Logic Extension - Design Panel If Else Statement 
  20. In the If Branch section of the If Else side panel, click the Launch Criteria Builder (Edit) icon.
    The Criteria Builder window is displayed and the Edit icon in the Left Operand field is highlighted.
  21. From the Quick Selection panel on the right, in the Data Structure section, click Version.
    Logic Extension - Map Version
    Data Structure -Map Version 
    In the left panel, verify that Version is displayed in the Left Operand field, value in the Compare Operator field is displayed as is equal to, and Edit icon in the Right Operand field is highlighted.
  22. In the right panel, click the Literal icon.
  23. Build Query - Literal
                      Icon
    Build Query - Literal Icon 
  24. In the Single Value field, enter ZJDEC002 and click OK.
  25. Version
                      - ZJDEC002
    Version - ZJDEC002 
  26. Click X, to close the Criteria Builder window.
  27. In the If Else side panel, change the value in the Branch Label field as  Check if “Version” is equal to “ZJDEC002”.
  28. Logic Extension - If Else Panel
    Logic Extension - If Else Panel 
  29. From the Statement panel, in the Logic tab, drag and drop Form Control Function on the True (Check if “Version” is equal to “ZJDEC002”) branch in the design panel.
    The Form Control Function side panel is displayed on the right.
  30. In the Form Control Function side panel, from the Function Name drop-down list, select Disable Control.
  31. 
Logic Extension - Form Control Function - Disable Control
    Logic Extension - Form Control Function - Disable Control 
  32. From the Control drop-down list, select Control2.
  33. Click Save.

section 2Associating the Form Control Extensions with Events

In this section, you will associate the Disable form controls for a version logic extension to the Post Dialog is Initiated event on the Address Book Revisions form.

  1. Sign in to the JD Edwards EnterpriseOne application.
  2. To access the Work With Address application, in the Fast Path field, enter P01012 and press Enter.
  3. Click Add.
  4. On the Address Book Revision form, click the Form Extension Manager icon. The Form Extension Manager panel is displayed on the right.
  5. In the Address Book Revision form, click the Mailing tab.
  6. Address Book Revisions Form- Mailing Tab
    Address Book Revisions Form- Mailing Tab 
  7. In the Form Extension Manager tab on the right, click the Associate Orchestrations link. The Associate Orchestrations wizard is displayed.
  8. Associate Orchestrations Link in Form Extension Manager
    Associate Orchestrations Link in Form Extension Manager 
  9. Click in the Control field, and then on the Address Book Revision form, click anywhere outside the header or the grid area. The list of events context menu is displayed.
  10. List of Events
    List of Events 
  11. Select the Post Dialog is Initialized event.
    Verify that the values Address Book Revision and Post Dialog is Initialized are displayed in the Control and Event fields respectively in the Associate Orchestrations wizard.
  12. Associate Orchestrations Wizard
    Associate Orchestrations Wizard 
  13. Click the Logic Extensions tab.
  14. Click the Next button.
  15. In Step 2: Select Logic Extension, from the Logic Extension drop-down list, select Disable form controls for a version. This is the logic extension that you created in the previous section of this OBE.
  16. Associate Logic Extensions Step 2
    Associate Logic Extensions Step 2
  17. Click the Next button.
  18. In Step 3: Define Inputs, in the Define Inputs tab, from the Mapping Input drop-down list, select SL Version Name.
  19. Step 3 Define Inputs
    Step 3 Define Inputs 
  20. Click the Map Form Controls tab.
  21. In the Mapping Control field, click the Default Array icon.
  22. Map Form Controls - Default ArrayMap Form Controls - Default Array
  23. Add the following mapping controls to the grid: Mailing Name, Secondary Mailing Name, Address Line 1, Address Line 2.
    Note: If required, use the cursor to move the Associate Logic Extensions wizard to the right so that you can see the fields on the form.

    Click in the Click Input Fields to Map field, then use the cursor to select the Mailing Name field on the form.
    Verify that Mailing Name appears in the Click Input Fields to Map field. Similarly, map the Secondary Mailing Name, Address Line 1, and Address Line 2 fields. The values in the Control ID fields are automatically populated.

    Verify that your mappings are displayed as shown in the following screenshot.
  24. Map Form Controls
    Map Form Controls 
  25. Click Save.
  26. Click Next.
  27. In Step 4 of the Associate Logic Extensions wizard, click Next.
  28. In Step 5 of the Associate Logic Extensions wizard, click Save, as the Controls to Hide logic extension has no outputs.
  29. Click Close to close the Associate Logic Extensions wizard.
  30. In the Form Extension Manager panel, click Save.
    You have now associated the logic extension with events on the form. The next section explains how to test the form control extensions.

section 3Testing the Logic Extension and the Form Control Extension

  1. Sign in to the JD Edwards EnterpriseOne application.
  2. To access the Work With Address application version ZJDE0001, in the Fast Path field, enter P01012|ZJDE0001 and press Enter.
  3. In the Address Number field, search for and select the 3090 record.
  4. Click Select. The Address Book Revision form is displayed.
  5. Click the Mailing tab.
  6. Verify that the fields are editable.
  7. Work with Addresses (P01012|ZJDE0001)
    Work with Addresses (P01012|ZJDE0001)
  8. To access the Work With Address application version ZJDEC002, in the Fast Path field, enter P01012|ZJDEC002 and press Enter.
  9. In the Address Number field, search for and select the 3090 record.
  10. Click Select.
    The Address Book Revision form is displayed.
  11. Click the Mailing tab. Verify that the fields are disabled.
    Work with Addresses(P01012|ZJDE0002)
    Work with Addresses(P01012|ZJDEC002)
    The fields are disabled on this form because we associated a form control extension to this form that hides the fields for the ZJDEC002 version.

section 5Conclusion

In this OBE, you learned how to:

  • Create a logic extension with a form control extension to disable controls (fields) on a form. This logic extension checks if the version is ZJDEC002 and disables the fields on the form. The fields are not disabled for any other versions.
  • Associate the logic extensions to events on the form. The Post Dialog Is Initialized event launches the form extension to disable the fields on the form if the version is ZJDEC002.

    Using these skills and this same pattern, you could create logic extensions that accept inputs from forms, evaluate values for If/Then paths, and selectively show, hide, enable, disable, set control text, and set control color.

more informationWant to Learn More?