Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
What is a Delete Action?
The
action deletes records for a selected table. Insert excerpt _delete _delete nopanel true
Note: Delete actions will only delete records in tables with the Period of Transactional.
Insert excerpt 1.09 Save Action Configuration 1.09 Save Action Configuration name TablePeriod nopanel true
Creating Delete Actions
- Click the
icon in the toolbar to display any existing tables in the applicationInsert excerpt _delete _delete nopanel true - Existing tables can be dragged from the Repository onto the canvas, then choose
to create a Delete nodeInsert excerpt _delete _delete nopanel true
- Existing tables can be dragged from the Repository onto the canvas, then choose
- Alternatively, drag the
icon from the toolbar onto the canvasInsert excerpt _delete _delete nopanel true - In the Create Delete Action window:
- Enter a name
- Choose the Table from the drop down where the records will be deleted
- Select Create Action
HTML Comment | ||
---|---|---|
| ||
Need to create a page on the Delete node properties. |
When creating delete actions it can be useful to set up confirmation messages that allows users to confirm or cancel the deletion. See 1.13 Confirmation Message Configuration.
Worked Example
Here's a worked example using the School Data (available from the Learning Centre).
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, this data has already been pre-loaded into the Actionflow Application. |
In this example, we want to be able to delete courses in the School Courses grid on the Course Management screen. We will also configure the Delete Actions on the input form
Note: When creating new screens and input forms in PhixFlow, Grid Actions and Form Actions wizards are available to configure the Delete actions for you. For the purposes of understanding the mechanics of Actionflows, we will create these manually.
Delete Action on Grid
- On the Course Management screen, right-click on the button and choose
Insert excerpt _actionflow_add _actionflow_add nopanel true - Enter a name for the Actionflow,
- Name:
Delete Course (Course Grid)
- Select Confirm
- Name:
- Select Click to Connect and for the input, choose the School Courses
datasource, then select Connect InputInsert excerpt _grid _grid nopanel true - In the Mappings window that opens, drag the CourseID attribute from the left (School Courses Grid) to the right (Input Connection Point)
- Select Save
- Click and drag the
icon from the toolbar onto the canvasInsert excerpt _delete _delete nopanel true - In the Create Delete Action window enter:
- Name:
DeleteCourse
- Table: choose School _ Courses
- Select Create Action
- Name:
- Click and drag the
icon onto theInsert excerpt _driving_interface_connection_point _driving_interface_connection_point name icon nopanel true
action nodeInsert excerpt _delete _delete nopanel true - Right-click on the in connector and choose
Insert excerpt _open_mappings _open_mappings nopanel true - Drag the CourseID attribute on the left onto the CourseID attribute on the right
- Select Save
- Close the Actionflow to return to the Course Management screen
the screen and select a record in the grid, then press the buttonInsert excerpt _lock _lock nopanel true
Delete Action on Form
- On the Course Management screen, select the or button to open the Course Form
- Right-click on the button on the Course Form and choose
Insert excerpt _actionflow_add _actionflow_add nopanel true - Enter a name for the Actionflow,
- Name:
Delete Course
(Course
Form)
- Name:
- Repeat the above steps to configure the Actionflow but make the following changes:
- the input is the Course
Insert excerpt _form _form nopanel true - in the Settings, toggle on
Close screen after action completes - this will close the Course Form when is pressedInsert excerpt _toggle_on _toggle_on nopanel true
- the input is the Course
- Once you have configured the Actionflow, return to the Course Management screen
the screen, select a record in the grid and press the buttonInsert excerpt _lock _lock nopanel true - On the Course Form, press the button
- If the Actionflow has been set up correctly, the Course Form will close and the selected record will be deleted from the School Courses Grid
Tip | ||
---|---|---|
| ||
An Actionflow can be reused where the same Actionflow setup is required but with a different input data. The setup of the two Actionflows we created above have one key difference - the Delete Course (Course Form) Actionflow has Close screen after action completes enabled. If we were to reuse this Actionflow with two different inputs (grid and form), the Close screen after action completes option would need to be consistent across both instances of the Actionflow. |