By the end of this chapter you will understand what a confirmation message is and how to use themhow confirmation messages can be added to Actionflows, and you will have added a confirmation message to your application.
Confirmation Messages
The Confirmation messages can be added to Actionflows, e.g. Save, Delete, etc. by inserting an additional savesave action inserts or updates records in a selected table.
Save actions only save attributes mapped into them. However, if the Save action has Auto Save Attributes enabled, this saves unmapped attributes from the input form or view, matched by identifier. This finds the attribute associated with a field that was created by dropping the attribute onto a form.
Note: Save actions must be attached to a table with a Type of Transactional. Reword? "Save actions will only insert or update records in tables with the Type of Transactional."
Creating Save Actions
Click the before the Actionflow processing phase, i.e. where the Save, Delete, etc. action is.
A confirmation phase is useful where the user must:
- Confirm an action before continuing
- Choose an option to determine which phase runs
Creating Confirmation Messages
Confirmation messages require two screens:
- an "initiator" screen where the required action (e.g. delete) is initiated from
- a "confirmation" screen that contains the confirmation message, plus buttons to confirm/proceed or cancel/go back
- the button for confirm/proceed must be set up with an Action Type of Confirmation
See Creating or Opening a Screen.
- On the confirmation screen, click on the Confirm button to open its
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
, then click on the Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
- In the Action Settings, set:
- Action Method: choose
Other
- Action Type: choose
Confirmation
- this setup allows the Confirm button to trigger the next phase in the Actionflow
- On the initiator screen, set up the Actionflow for the required action, e.g. see 1.12 Delete Action Configuration
- Above the Actionflow canvas, click the button next to the Processing savesave icon in the toolbar to display any existing tables in the applicationExisting tables can be dragged from the Repository onto the canvas, then choose
- Choose Add Phase Before to set up the confirmation phase
- From the Actionflow toolbar, click
Insert excerpt |
---|
| _screen |
---|
| _screen |
---|
nopanel | true |
---|
|
to open the list of available screens- Drag the confirmation screen onto the Actionflow to create an savesave action node to create a Save node
- Alternatively, drag the To allow the confirmation screen to trigger the next
Insert excerpt |
---|
| _action_phase |
---|
| _action_phase |
---|
nopanel | true |
---|
|
phase in the Actionflow, drag a savesave icon action node from the toolbar onto the canvas In the Create Save Action window: - Enter a name
- Choose a Type:
- Auto Insert/Update - Insert or update records using the following condition:
- If the input data passes in the primary key of an existing record, the save action updates the record in the chosen table
- If the input data does not pass in the primary key of an existing record, the save action inserts a new record in the chosen table
- Insert - Always insert a new record into the chosen table
- Update - Always update a record for the chosen table. For a record to update successfully a primary key must be provided.
- Choose the Table from the drop down where the records will be inserted or updated
Select Create Actionand in the popup select the Processing Insert excerpt |
---|
| _action_phase |
---|
| _action_phase |
---|
nopanel | true |
---|
|
- Hover over the
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
action node and click Image Added, then click the Insert excerpt |
---|
| _action_phase |
---|
| _action_phase |
---|
nopanel | true |
---|
|
action node to connect them.
HTML Comment |
---|
|
Insert excerpt |
---|
| Save Node | Save NodeConfigure a Confirmation |
---|
| Configure a Confirmation |
---|
nopanel | true |
---|
|
|
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. |
Earlier in this course we created two Open Screen Actionflows that open an input form for adding and editing courses to a Delete Action Actionflow to delete courses in the School Courses grid on the Course Management screen. In this example we will configure the Save action.Note: When creating a new input form in PhixFlow, a Form Actions wizard can configure the Save Record and Delete Record actions for you. For the purposes of understanding the mechanics of Actionflows, we will create these manually.insert a Confirmation phase into that Actionflow to trigger a confirmation message before the Delete Action takes place.
Note: Insert excerpt |
---|
| _action_phase |
---|
| _action_phase |
---|
nopanel | true |
---|
|
s will be covered in detail later in this course.
Setting up a Confirmation Screen
In order to use a screen as a confirmation it must be set up a certain way.
The screen must have a Confirm button on with an action type of confirmation
- Click on the icon in the PhixFlow header bar
- Select
Insert excerpt |
---|
| _add_screen |
---|
| _add_screen |
---|
nopanel | true |
---|
|
on the left - In the Create Screen window, enter the following details:
- Name: Confirmation Screen
- Open Maximised: toggle off
- All users can View Data: toggle on
- Description:
A generic confirmation screen
- Please select a Template, choose
Confirmation
- Click Create Screen.
- The screen will be created and will automatically open
- Click on the Confirm button to open its
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
, then click on the Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
- You can see here that this button has an Action Method of Other and an Action Type of Confirmation - this is important as it is this setup these settings that allows allow the Confirm button to trigger the Delete Action phase we will setup below phase
- No edits are required to this screen
- Close the Confirmation Screen
Configuring a Confirmation Actionflow
- On the Course Management screen, open the Delete Actionflow by right-clicking on the button and choosing
Insert excerpt |
---|
| _actionflow_display |
---|
| _actionflow_display |
---|
nopanel | true |
---|
|
- Above the Actionflow canvas are the phases
- Image Removed
Click , click the button next to Processing Phase
- Image Added
- Select Add Phase Before and set:
- Name:
Confirmation
- Press Confirm Confirm
- Select Click to Connect and choose an the Input of On Click
- Press Connect Input
- From the Actionflow toolbar, click
Insert excerpt |
---|
| _screen |
---|
| _screen |
---|
nopanel | true |
---|
|
to open the list of available screens .in your application - Drag the confirmation screen Confirmation Screen you made earlier onto the Actionflow .canvas
- Drag the input node the
Insert excerpt |
---|
| _input |
---|
| _input |
---|
name | icon |
---|
nopanel | true |
---|
|
icon from Connections onto the Open Confirmation Screen action node to connect them
- From the toolbar, drag an a
Insert excerpt |
---|
| _action_phase |
---|
| _action_phase |
---|
nopanel | true |
---|
|
node action node onto the canvas and in the popup select the phase, Processing Phase, to run after the confirmation has been completed - Hover your mouse pointer over the Open Confirmation Screen Open Screen action node, click , then connect the open screen node
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
action node to the Insert excerpt |
---|
| _action_phase |
---|
| _action_phase |
---|
nopanel | true |
---|
|
action node. - Close the Actionflow to return to the Course Management screen
- the screen, select a record and press the button
- We can see that the Actionflow is working because when you press Confirm on the Confirmation Screen shows and if you press Confirm, the selected record is deleted