Upload Changes from a Table Layout
When you click the Upload Changes button for a Table layout, here's what happens:
- The add-in checks the table for pending changes. If there are no pending changes, upload is skipped.
- If a Pre-Upload macro is configured, it is invoked. If the macro throws an exception or returns any value other than
true
, the upload process quits. - For pending Create and Update operations, the rows are first validated locally, for example, data type, required, and so on. See Data Validation. Any failures are marked as failed and skipped (these rows do not produce requests on the business object service).
- Pending changes are generally processed as follows:
- Updates result in a PATCH or PUT request on the item path.
- Creates result in a POST request on the collection path.
- Deletes result in a DELETE request on the item path.
- Rows marked for action result in a POST request on the item action path.
For more details on how rows are sent in separate requests, see Upload Table Changes Using Separate Requests for Each Row.
Note:
Multi-Row processing is handled differently. See Upload Changes Using Multi-Row Requests. - Success and failure is noted in the Status column. Rows with warnings are indicated with a warning icon.
Errors and warnings are cached and displayed in the Status Viewer when the business user selects a row. Here is a sample of the Status Viewer showing one successful and one failed row creation.The Selected row status area displays details for each failed update or create operation. For each failed row, the viewer lists the field or fields that caused the failure. When possible, the add-in includes a hyperlink on the field title to the row cell in the layout. Here, a required value for Hire Date was not entered before the upload attempt. See Upload Changes to the Web Application in Managing Data Using Oracle Visual Builder Add-in for Excel.
Note:
The add-in displays a hyperlink on the field title if the field id is present in theo:errorPath
JSON member in the upload response from the REST service. - Successful Create rows are updated from the service if possible. These rows are converted into existing rows that can be edited.
Note:
If the service does not return the newly created rows, you will need to download them before doing any further editing. - Successful Delete rows are removed from the Excel worksheet.
For Create and Update operations, the request payload only includes values for editable cells in a new or updated row. Read-only fields and custom action payload fields are not included. Whether a value is included for an editable cell depends on your add-in settings:
- For updated rows, the request payload includes a value for each editable field unless Send Only Changed Data for Updates is enabled in the Layout Designer. When enabled, only values that have changed since the last download or upload are included in the payload. See Send Only Changed Data During Upload.
-
For new and updated rows, the request payload includes a null value for each empty cell in the row unless Omit from payload if value is empty is enabled for a field in the Business Object Field Editor.
When this check box is enabled and the corresponding cell is empty, the field is not included in the request payload. When this check box is not checked and the corresponding cell is empty, the field is included in the request payload with a null value. See Omit Empty Values During Upload.
The add-in may send up to four requests to the service at a time for improved performance (on different threads). As a result, the order in which the rows are sent to the server is non-deterministic. It is not guaranteed to be in the same order as in the table. See Enable Parallel Requests During Upload.