What is a Bulk
Delete Update Action?
Image RemovedImage Added
The
Insert excerpt |
---|
| _action_bulkdeletebulkupdate |
---|
| _action_bulkdeletebulkupdate |
---|
nopanel | true |
---|
|
action
deletes updates records in bulk
from in a table,
such as deleting all records, or those including saving new records. Only records which satisfy the specified filter criteria set on the node
will be updated.
Note: Bulk Delete Update actions will only delete update records in tables with the Period of Transactional.
Insert excerpt |
---|
| 1.09 Save Action Configuration1.09 |
---|
| Save Action Configuration |
---|
name | TablePeriod |
---|
nopanel | true |
---|
|
delete
delete vs
bulk_delete
bulk_delete
The key difference between deletedelete and bulk_deletebulk_delete is that the Bulk Delete action purges records from PhixFlow, including Bulk Update action will not update the audit history of records where Audit Manual Changes has been enabled.
To delete To update records and persist the audit history of the record, see Delete NodeSave Action Configuration.
Creating Bulk
Delete Update Actions
- Click the bulkdeletebulkdelete icon in the toolbar to display any existing tables in the application
- Existing tables can be dragged from the Repository onto the canvas, then choose bulkdeletebulkdelete to create a Bulk Delete Bulk Update node
- Alternatively, drag the bulkdeletebulkdelete icon from the toolbar onto the canvas
- In the Create Bulk Delete Bulk Update Action window:
- Enter a Name
- Choose a Type from: Delete: allows only records satisfying the specified filter criteria to be deletedSet the filter criteria in the Bulk Delete Action
Insert excerpt |
---|
_property_settings | _property_settings | nopanel | true |
under Data Retrieval Options - see section below - Delete All: deletes all data from the selected table
Choose to Allow Audited Table to display tables with Audit Manual Changes enabled in the Table drop down- By default, tables with Audit Manual Changes enabled are not shown in the Table drop down list
- Choose the Table from the drop down where the records will be deletedupdated
- Or click the table icon to display tables in the Repository
- Select Create Action
When creating delete creating update actions it can be useful to set up confirmation messages that allow users to confirm or cancel the deletionupdate. See 1.13 Confirmation Message Configuration.
Setting
Delete Update Action Filter Criteria
Where the Type is set to Delete on the Insert excerpt |
---|
_action_bulkdelete | _action_bulkdelete | nopanel | true |
action, the A filter must be set for the Bulk Update action to run. Set this in the Data Retrieval Options section
shows in the of the Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
. This filter must be set for the Bulk Delete action to run.
- Choose a Data Range from:
- Latest: selects data from the latest recordsets
- All: selects data from all recordsets (default)
- Set the Filter Criteria to specify which records will be selected for deletionupdated. See Filter → Filter Details
- Incoming attributes mapped to the Bulk Delete node Update node can be referenced in the Data Retrieval Options using the syntax, ConnectorName.AttributeName, e.g. in.MyAttribute
Specify Delete Batch Size
Where the Type is set to Delete on the Insert excerpt |
---|
_action_bulkdelete | _action_bulkdelete | nopanel
true | action, in the Advanced section, an optional Delete Batch Size can be set to determine the size of the batches. If left blank the batch size set in System Configuration → System Tuning → Delete Batch Size, is used as the default. The System Configuration value can be overridden with this batch size. HTML Comment |
---|
|
Insert excerpt |
---|
| Bulk Delete Update Node |
---|
| Bulk Delete Update Node |
---|
nopanel | true |
---|
|
|
Worked Example
Here's a worked example using the Company Data (available from the Learning Centre).
In this example, we are using:
- A Company Rejected Companies screen containing three grids of the Companies, Management screen containing a grid of the Companies data and a card container of their associated Employees - this screen was created using the Multi-Tile template
- A Company Merger Pop up screen containing:
- two manual drop down fields of the company name's of the companies to be merged
- two string fields showing the company ID's of the companies to be merged
- a button to initiate the Actionflow - this screen was created using the Tile no Buttons template
- A Company Orders screen containing two grids of the Orders and OrderLines data - this screen was created using the Multi-Tile template
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, the data and screens have already been pre-loaded into the Actionflow Advanced Application. For this example, we'll be working on the Company Rejected CompaniesManagement screen. |
Image Removed
Bulk Delete Rejected Companies
Actionflow Setup
Excerpt |
---|
|
Bulk Update Employees and Orders for Company AcquisitionIn this example, |
we'll set up an Actionflow to delete all companies with a Status of Rejected, along with any associated Orders and Order Lines.Open the Company Rejected Companies a company is being merged into another company and we need to update the employees and orders to reflect the change. Image Added Actionflow Setup- Open the Company Management screen
- Click the Merge button to open the Company Merger Pop up screen
- Create an Actionflow on the
|
Bulk Delete - Run Acquisition button
- Name:
|
BulkDeleteRejectedCompaniesCreate -
RunCompanyAcquisition
- On the Actionflow canvas, toggle on
Insert excerpt |
---|
| _toggle_on |
---|
| _toggle_on |
---|
nopanel | true |
---|
| Close screen after action completes- This ensure the pop up screen closes after the acquisition has been run
- Configure the input connection point to the
|
Companies data on the screenOn the Mappings window, ensure Page is selected for What data is being used?- Image Removed
Map in CompanyID- Company Merger form
- Map in the two CompanyID fields from the screen, CompanyIDBeingAcquired and CompanyIDDoingAcquiring
Bulk Update Action SetupA Bulk Update action is required to update the data in each table. - Create two
|
viewview for - : one to update the Employees data and one to update the Orders
|
and OrderLines dataThese should contain filters so only the Orders and OrderLines for the companies with a Status of Rejected are mapped
Expand |
---|
|
Image Removed Image Removed |
Bulk Delete Action Setup
- Create three Bulk Delete Actions for deleting from the three tables: Companies, Orders and OrderLines
- Map the associated ID attribute into the relevant Bulk Delete node
- Set up filters on each node in the Data Retrieval Options section to ensure only records associated with a rejected company are deleted
Expand |
---|
|
Image Removed Image RemovedImage Removed |
Testing
Return to the Company Rejected Companies screenPress Bulk Delete buttonRefresh the data in each grid to see the results- data
- Drag the onto each action
Update Employees Insert excerpt |
---|
| _action_bulkupdate |
---|
| _action_bulkupdate |
---|
nopanel | true |
---|
| SetupMap in the required data and set up the action to update the data with the replacement company details. - Map the attribute, CompanyIDDoingAcquiring, onto the CompanyID attribute on the table
- Drag across the attribute, CompanyIDBeingAcquired, into the drag and drop space to create an additional mapping
- On the
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
| for the Employees Bulk Update action, set the Data Retrieval Options to:CompanyID - equals
in.CompanyIDBeingAcquired
Update Orders Insert excerpt |
---|
| _action_bulkupdate |
---|
| _action_bulkupdate |
---|
nopanel | true |
---|
| SetupMap in the required data and set up the action to update the data with the replacement company details. - Map the attribute, CompanyIDDoingAcquiring, onto the Customer_ID attribute on the table
- Drag across the attribute, CompanyIDBeingAcquired, into the drag and drop space to create an additional mapping
- On the
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
| for the Orders Bulk Update action, set the Data Retrieval Options to:Customer_ID - equals
in.CompanyIDBeingAcquired
Tip |
---|
title | Why is a Bulk Update action not needed for Order Lines? |
---|
| The OrderLines data has a direct relationship with the Orders data via the OrderID. The OrderLines data has an indirect relationship with the Companies data via the OrderID, therefore, updating the Orders data is sufficient. |
Expand |
---|
| Image Added |
|
Testing
- Close all screens and reopen the Company Management screen
- Decide which two companies you will merge
- Make a note of their employees on the Company Management screen so you can see if the merge is successful
- Open the Company Orders screen and make a note of any Orders and Order Lines for the two companies
- On the Company Management screen, click the Merge button to open the Company Merger Pop up screen
- Select the two companies using the drop down fields and click the Run Acquisition button
- Review the screens to check the merge was successful
Insert excerpt |
---|
| Bulk Delete Action Configuration |
---|
| Bulk Delete Action Configuration |
---|
name | ReinstatingData |
---|
nopanel | true |
---|
|
Image Modified