Getting Started

In this section we will configure a custom action button both in the EnterWorks UI as well as in the EnterWorks 2020 UI. The steps to do so are:

  1. Set up an HTML page to gather user input.
  2. Set up a custom action option on the relevant attribute.
  3. Test our solution.

 Set Up the HTML Page

The first step in configuring a custom action button is to set up an HTML page to collect user input.

  1. Set up an HTML page in the following folder:
    \\<server> \d$\Enterworks\EnableServer\tomcat\webapps\webcm\custom
  2. Create a JSP file in the same folder and name it accordingly. For example: AnalogAction.jsp.

    Don’t worry too much about what is in the JSP file for now; we just want it there so that we can point to it.
  3. Create a copy of the JSP file and change its extension to an HTML extension. This must be done because the EnterWorks 2020 UI looks for an HTML file rather than JSP file.
  4. Move the new HTML file to the following folder where the EnterWorks 2020 UI will access it:
    \\<server>\d$\Enterworks\enable2020\custom.
  5. Now that we have set up the JSP and HTML files in both folders, we can access the attribute properties to point to those files in the EnterWorks UI and the EnterWorks 2020 UI.

  Point to the Custom Action JSP/HTML

  1. Using the server’s EnterWorks UI, in the Feature Bar, highlight the name of the repository that contains the attribute.
  2. Click the arrow to the right of the repository’s name to open the action menu, select Edit, and select Attribute Properties.
  3. Navigate to the attribute the custom action will be applied to. (In this example we use Available Analogs.)

  4. Edit the following settings as desired:
    • Calculation Ind : The action to occur when you click the custom action button (in this example it will open a new window).
    • Calculation Label : The label for the action.
    • Calculation Url : This is the file name of the HTML/JSP we created and placed inside the folders as described above.
  5. When you have finished editing, click the Save button and close the window.

  Check the Attribute Set Up

Now we will check that the attribute’s custom action has been defined correctly in both the EnterWorks UI and EnterWorks 2020 UI.

Open a record that displays the attribute on which you have created the custom action. When you click the button, it should open your HTML/JSP page.


Testing the Custom Action in the EnterWorks UI


Testing the Custom Action in the EnterWorks 2020 UI