Adding a Record Editor gadget to an application
You can add a Record Editor gadget (pxRecordsEditor) to your application so that users can view and edit data records anywhere in the application, not just in the Data Designer. You can also decide which fields to display, referred to as a view, based on what the user is doing. For example, at times users might only need to see the fields for contacting customers, and at other times they might need to search and filter by department. You can quickly and easily create these views by using the Record Editor gadget.
The high-level steps for adding a Record Editor to an application are:
- Create a section that includes the Record Editor gadget that can be added to your application.
- Create a report definition to specify which columns are displayed in the Record Editor.
- Configure the Record Editor gadget to specify the functionality to include, for example, full-text search and the ability to add, delete, import, and export data.
Limitations
The Record Editor gadget has the following limitations:
- The Record Editor gadget cannot be used in the New, Review, and Perform harnesses.
- A report definition that uses summary functions is not supported.
- When you add or update calculated properties, the properties that use functions in the report and the joined class properties are shown as read-only.
- Reports with parameters are not supported.
Creating a section that includes the Record Editor gadget
To use the Record Editor in your application, add the Record Editor gadget to an embedded section, which can then be included in your application.
- Click .
- In the Label field, enter a short description.
- In the Apply to field, select the class that represents the data that you want to display.
- In the Add to ruleset field, select the ruleset to which this section applies.
- Click Create and open.
- Click Layout.
- Click Embedded section and drag it to where you want it located in the section.
- In the Section Include dialog box, in the Section field, select pxRecordsEditor to add the Record Editor gadget to the section.
Section Include dialog box
- Click Submit.
- Click Save.
For more information about sections, see About sections.
Creating a report definition
The report definition determines which columns are displayed in the Record Editor. It can include joined class properties. After you create the report definition, you configure the Record Editor gadget to use it.
- Click +Create > Reports > Report Definition.
- In the Label field, enter a short description.
- In the Apply to field, select the class that represents the data that you want to display. The class must be the same class that you selected when you created the section.
- Click Create and Open.
- Select the columns that you want to display in the Record Editor gadget.
- Click Save.
For more information about creating reports, see Creating reports in Designer Studio.
For more information about report definitions, see Report Definition rule form.
Configuring the Record Editor gadget
You can configure the Record Editor features that will be available in your application.
- Open the section that contains the pxRecordsEditorsection.
- Click the View properties icon in the pxRecordsEditorsection.
- Click the Parameters tab.
Layout Properties dialog box
- In the Data Source Class Name field, select the class name (pyClassName) of the data type that has the records that you want to display.
- In the Report definition Name field, select the report definition that you want to use to display the data.
- Optional for screens that contain only one view: In the Report Page Name field, enter the name of the view that you want to use.
You can create a report page and populate the data on the page before rendering the gadget during run time, or you can populate the data on the page at run time.
- Optional: Select the options that you want to make available to users in the application.
- Show import and export – When selected, displays the import and export buttons. When a user clicks Export, the current view is downloaded as a .csv file. When a user clicks Import, the user can choose a .csv file to import and map the fields in the .csv file to the fields in the data type; only the mapped fields are imported. For more information about importing, see Importing data for a data type. For more information about exporting, see Exporting data from your application.
- Show search – When selected, displays the Search field. The Search field filters the results to display only those records that contain the search text in any field in the report definition.
- Use full text search – When selected, allows full-text search. Full-text searches are performed against the global search index instead of against the database. For more information, see Full-text search. and Enabling and disabling classes for search indexing.
- Hide the add option – When selected, the add option is not displayed. If the add option is enabled, only non-calculated property values for the current class can be added or edited. Calculated property columns or other class property values will be in read-only mode. This option is always hidden for Work- records, regardless of how this parameter is set.
- Hide the delete option – When selected, the delete option is not displayed. 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. This option is always hidden for Work- records, regardless of how this parameter is set.
- Click Submit.