Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

By the end of this chapter you will understand what a confirmation message is and how to use them, and you will have added a confirmation message to your application.

What is a

Confirmation

Message?

Messages

The 

Insert excerpt
_action_save
_action_save
nopaneltrue
 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

  1. Click the 
    Insert excerpt
    _action_save
    _action_save
    nopaneltrue
     icon in the toolbar to display any existing tables in the application
    1. Existing tables can be dragged from the Repository onto the canvas, then choose 
      Insert excerpt
      _action_save
      _action_save
      nopaneltrue
      to create a Save node
  2. Alternatively, drag the 
    Insert excerpt
    _action_save
    _action_save
    nopaneltrue
     icon from the toolbar onto the canvas
  3. In the Create Save Action window:
    1. Enter a name
    2. Choose a Type:
      1. Auto Insert/Update - Insert or update records using the following condition:
        1. If the input data passes in the primary key of an existing record, the save action updates the record in the chosen table
        2. 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
      2. Insert - Always insert a new record into the chosen table
      3. Update - Always update a record for the chosen table. For a record to update successfully a primary key must be provided.
    3. Choose the Table from the drop down where the records will be inserted or updated
    4. Select Create Action
HTML Comment
hiddentrue

Insert excerpt
Save Node
Save Node
nopaneltrue

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 the School Courses grid. 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.

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 

  1. Click on the  icon in the PhixFlow header bar
  2. Select
    Insert excerpt
    _add_screen
    _add_screen
    nopaneltrue
     on the left
  3. In the Create Screen window, enter the following details:
    1. Name: Confirmation Screen
    2. Open Maximised: toggle off 
    3. All users can View Data: toggle on
    4. Description: A generic confirmation screen
    5. Please select a Template, choose Confirmation
    6. Click Create Screen.
  4. The screen will be created and will automatically open
  5. Click on the Confirm button to open its 
    Insert excerpt
    _property_settings
    _property_settings
    nopaneltrue
    , then click on the 
    Insert excerpt
    _property_tabs
    _property_tabs
    nameaction
    nopaneltrue
  6. 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 that allows the Confirm button to trigger the Delete Action phase we will setup below
  7. No edits are required to this screen
  8. Close the Confirmation Screen


Configuring a Confirmation Actionflow

  1. On the Course Management screen, open the Delete Actionflow by right-clicking on the  button and choosing 
    Insert excerpt
    _actionflow_display
    _actionflow_display
    nopaneltrue
  2. Above the Actionflow canvas are the phases
  3.  Click the 
    Insert excerpt
    _add
    _add
    nopaneltrue
     button next to Processing Phase
  4. Select Add Phase Before and set:
    1. Name: Confirmation 
    2. Press Confirm  
  5. Select Click to Connect and choose an Input of On Click 
    1. Press Connect Input
  6. From the Actionflow toolbar click 
    Insert excerpt
    _screen
    _screen
    nopaneltrue
    to open the list of available screens.
  7. Drag the confirmation screen you made earlier onto the Actionflow.
  8. Drag the input node onto the Open Screen node to connect them 
  9. From the toolbar, drag an  
    Insert excerpt
    _action_phase
    _action_phase
    nopaneltrue
     node onto the canvas and in the popup select the phase, Processing Phase, to run after the confirmation has been completed
  10. Hover your mouse pointer over the Open Confirmation Screen Open Screen node, click  , then connect the open screen node to the
    Insert excerpt
    _action_phase
    _action_phase
    nopaneltrue
     node.
  11. Close the Actionflow to return to the Course Management screen
  12. Insert excerpt
    _lock
    _lock
    nopaneltrue
     the screen, select a record and press the  button
    1. We can see that the Actionflow is working because the Confirmation Screen shows and if you press Confirm, the selected record is deleted