Adding a record editor section

To help users work more efficiently in your application, create contextual views of your data that provide specific fields and actions.

Create a report definition in the class of the relevant data type. Include columns for the fields that you want to display. Do not use summary functions or parameters in this report definition. For more information, see Creating a report definition

.
For example, you can display customer addresses in one view, and then provide another view that adds options to cross-reference the addresses with membership types. Add the pxRecordsEditor section to a layout, another section, or a cell in a layout. At run time, the record editor section allows you to add, edit, and delete data type records.
  1. Create the section that displays your data.
    1. In the header of Dev Studio, click Create > User Interface > Section.
    2. In the Label field, enter a short description.
    3. In the Apply to field, press the Down Arrow key, and then select the class of your report definition.
    4. In the Add to ruleset field, select a ruleset to store the section.
    5. Click Create and open.
    6. On the Design tab, click Layout.
    7. Click Embedded section, and then drag it to the section.
    8. In the Section Include dialog box, in the Section field, select pxRecordsEditor to add the Record Editor gadget to the section.
    9. Click Submit.
    10. Click Save.
  2. Click the View properties icon in the pxRecordsEditor section.
  3. Complete the General tab:
    1. Ensure that the Section list has the value By name and the Source field has the value pxRecordsEditor.
    2. From the Page Context list, select the page context for the section.
    3. In the Refresh Condition field, enter a simple expression based on the comparison of a pair of constants, properties, or both, combined by Boolean operators.
    4. In the Visibility field, select a value to control the visibility of the container.
    5. In the Caption field, click Label or Header to add a caption for the section.
  4. Complete the Presentation tab:
    1. From the Edit Options list, select an edit mode for this control. This edit mode takes precedence over section and harness settings.
    2. In the Advanced Options section, enter the desired cell width and height in pixels.
  5. Complete the Parameters tab:
    1. In the Data Source Class Name field, enter the class name of the data type for which you want to modify records in this section.
    2. In the Report definition Name field, enter the name of the report definition rule that you want to use to fetch the data for this section. You can also create a report definition by clicking the Open rule icon.
      You cannot add summarized reports in this field. Reports with parameters are not supported.
    3. Optional: In the Report Page Name field, enter the name of the top-level page for the virtual report definition that you want to use to fetch the data for this section. The page must be of class Rule-Obj-Report-Definition and contain the metadata of a valid report definition rule.
      If you enter values for both the Report Page Name and Report definition name fields, the system uses the value of the Report Page Name field to populate the data for this section.
      Tip: You can use this field to distinguish between multiple record editor sections in the same harness or to enable users to update the virtual report definition at run time.
    4. Optional: If you want to allow the import and export of data in this section by using .csv files, select Show import and export.
    5. Optional: If you want to search for data in this section at run time, select Show search.
      The Search field filters the results to display only those records that contain the search text in any field in the report definition. You can customize the search index. For more information about search indexes, see Rebuilding a search index.
    6. Optional: This option is available when Show search is selected. Select Use full text search to configure your application's record editor to use Elasticsearch.
      Full-text searches are performed against the global search index instead of against the database.
    7. Optional: To make the Add record button in your record editor unavailable, select Hide the add option. The Add record button is always hidden for work records regardless of what is selected here.
    8. Optional: To make the delete button for each row in your record editor unavailable, select Hide the delete option.
      When a user clicks Delete, the current class record is deleted from the database. If the Report Definition contains joined classes, the class record is not deleted. The Delete button is always hidden for work records regardless of what is selected here.
  6. Click Submit to save your changes.
  7. Click Save.
Add the section to relevant user interface. The Record Editor gadget cannot be used in the New, Review, and Perform harnesses.