Custom Confirmation Message Configuration

Custom Confirmation Messages

Custom confirmation messages are useful for displaying extra information that may help the user make a decision to proceed or go back. Bespoke messages can be added to confirmation screens using dynamic text components to display information, such as, names or totals. In addition, more than one confirm button may be required. These can perform similar functions, such as confirm only, or confirm and open another screen.

Creating simple confirmation screens is covered in the Actionflow Foundation Course. An extract from 1.13 Confirmation Message Configuration can be found below. A simple confirmation screen must be created before custom messages can be configured.

 Creating Simple Confirmation Screens

From 1.13 Confirmation Message Configuration:

Confirmation Screens

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
    • the button for cancel/go back must be set up with an Action Type of Close Screen


  • The Serene Grey palette contains a template confirmation screen with preconfigured Confirm and Cancel buttons

See Creating or Opening a Screen.

Creating Confirmation Messages

  1. On the confirmation screen, click on the Confirm button to open its  Properties, then click on the  Actions tab
  2. In the Action Settings, set:
    1. Action Method: choose Other
    2. Action Type: choose Confirmation
      1. this setup allows the Confirm button to trigger the next phase in the Actionflow
  3. On the initiator screen, set up the Actionflow for the required action, e.g. Delete
  4. Open the Actionflow for the required action, and above the Actionflow canvas, click the  icon next to the Processing  Phase
  5. Choose Add Phase Before to set up the confirmation phase
  6. On the confirmation phase, select Click to Connect and choose the Input of On Click
  7. From the Actionflow toolbar, click  Open Screen to open the list of available screens
    1. Drag the confirmation screen onto the Actionflow to create an  Open Screen action node
  8.  Drag the  icon from Connections onto the Open Confirmation Screen action node to connect them 
  9. To allow the confirmation screen to trigger the next  Phase phase in the Actionflow, drag a   Phase action node from the toolbar onto the canvas and in the popup select the Processing  Phase
  10. Hover over the  Open Screen action node and click , then click the  Phase action node to connect them.

Configuring Custom Messages

Use dynamic text components on the confirmation screen to display messages containing attribute data, such as names, statuses and counts.

  1. On your confirmation screen, add dynamic text and static text components, as required, to create your message
    1. In this example, a number of static and dynamic text components have been used to create a message where the two company names can be dynamically mapped onto the screen and given different formats, e.g. bold, font size, etc.
    2. A similar result can be achieved using one dynamic text component if no formatting differences are required
  2. Open the Actionflow containing the Confirmation  Phase
  3. Within the Confirmation  Phase, map the attributes from the initiator screen onto the dynamic text components, e.g. company name
  4. Create counts by configuring lookups to additional data, then using countElements within an Output Attribute on a  Calculate action
    1. See below worked example for full details on how to do this

Configuring Multiple Confirmation Buttons

Confirmation screens can contain multiple confirm buttons that perform similar functions, such as confirm only, or confirm and open another screen.

  1. On your confirmation screen, additional buttons can be added and configured with an Action Method of Other and an Action Type of Confirmation on their  Actions tab
  2. On the Actionflow for the action, e.g. delete, ensure a Confirmation Phase is added before the Processing Phase, and that the Confirmation Phase contains an  Open Screen action for the confirmation screen
  3. Right-click on the  Open Screen node and choose  Configure button mappings
  4. Create mappings for each confirmation button and click Confirm Mappings
  5. Hover over the  Open Screen node to see the additional output connections

Worked Examples

Here's are worked examples using the Company Data (available from the Learning Centre).

In this example, we are using:  

  • Company 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
  • 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 Merger Confirmation screen containing a multiple static and dynamic text components, and buttons - this screen was created using the Confirmation template
  • A Company Order Form screen containing form fields for the Orders data - this screen was created using the Edit Form template

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 Merger Confirmation screen.

Example 1: Custom Merger Message

In this example, a company acquisition screen requires a custom confirmation message to show the company names, and the quantities of employees and orders that will be affected by the merge.

Prerequisites

For this example, we'll add a custom confirmation message to a company merger Actionflow. If you have not completed 3.02 Bulk Update Action Configuration, expand the section below and follow the steps to create the company merger Actionflow.

 Create Company Merger Actionflow

Bulk Update Employees and Orders for Company Acquisition

In this example, a company is being merged into another company and we need to update the employees and orders to reflect the change.

Actionflow Setup

  1. Open the Company Management screen
  2. Click the Merge button to open the Company Merger Pop up screen
  3. Create an Actionflow on the Run Acquisition button
    1. Name: RunCompanyAcquisition
  4. On the Actionflow canvas, toggle on  Close screen after action completes
    1. This ensure the pop up screen closes after the acquisition has been run
  5. Configure the input connection point to the Company Merger form
  6. Map in the two CompanyID fields from the screen, CompanyIDBeingAcquired and CompanyIDDoingAcquiring

Bulk Update Action Setup

A Bulk Update action is required to update the data in each table.

  1. Create two  Bulk Update actions: one to update the Employees data and one to update the Orders data
  2. Drag the  input onto each action

Update Employees  Bulk Update Setup

Map in the required data and set up the action to update the data with the replacement company details.

  1. Map the attribute, CompanyIDDoingAcquiring, onto the CompanyID attribute on the table
  2. Drag across the attribute, CompanyIDBeingAcquired, into the drag and drop space to create an additional mapping
  3. On the  Properties for the Employees Bulk Update action, set the Data Retrieval Options to:
    1. CompanyID
    2. equals
    3. in.CompanyIDBeingAcquired

Update Orders  Bulk Update Setup

Map in the required data and set up the action to update the data with the replacement company details.

  1. Map the attribute, CompanyIDDoingAcquiring, onto the Customer_ID attribute on the table
  2. Drag across the attribute, CompanyIDBeingAcquired, into the drag and drop space to create an additional mapping
  3. On the  Properties for the Orders Bulk Update action, set the Data Retrieval Options to:
    1. Customer_ID
    2. equals
    3. in.CompanyIDBeingAcquired

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.


 Checkpoint

Lookup Setup

  1. Open the Company Merger Confirmation screen and familiarise yourself with the components available
  2. Open the Actionflow on the Run Acquisition button on the Company Merger Pop up screen
  3. Add a  Phase before the Processing Phase
    1. Name: Confirmation 
  4. Select the CompanyMerger datasource as the Input 
  5. Map into the Actionflow the four attributes from the screen:
    1. CompanyIDBeingAcquired
    2. CompanyIDDoingAcquiring
    3. CompanyNameBeingAcquired
    4. CompanyNameDoingAcquiring
  6. Setup a  Calculate action that will be used to process the lookup data
  7. Configure two lookups that will be used to retrieve the employees and orders for the company that is being acquired
 How to Configure the Employees Lookup
  1. Hover over the  Calculate action and choose Add Lookup
  2. Give the lookup a suitable name
  3. Click onto the canvas, then enter a suitable name for the   View and choose the Employees Primary Table
  4. Select an Output Attribute of EmployeeID, then select Next
  5. For the Request (Incoming) Mappings, choose CompanyIDBeingAcquired, then select Next
  6. For the Return (Outgoing) Mappings, map across EmployeeID to the Calculate action, then select Confirm and create filter
  7. For the filter, match the CompanyID in the data to the Incoming Mapping
 Checkpoint

 How to Configure the Orders Lookup
  1. This is configured in exactly the same way as the Employees lookup, with the following changes:
  2. For the   View choose the Orders Primary Table
  3. Select an Output Attribute of Order_ID
  4. For the Return (Outgoing) Mappings, map across Order_ID to the Calculate action
  5. For the Filter, match the Customer_ID in the data to the Incoming Mapping
 Checkpoint

Count and Open Screen Setup

  1. Create two Output Attributes on the Calculate action that count the records being retrieved from the lookups

     How?
    1. Create an Output Attribute:
      1. Name: NumberEmployees
      2. Type: Integer
      3. Expression: countElements(emp)
        1. emp is the name of the lookup connector
    2. Create an Output Attribute:
      1. Name: NumberOrders
      2. Type: Integer
      3. Expression: countElements(ord)
  2. Create an output connector from the Calculate action, then click on the canvas to create an  Open Screen action for the Company Merger Confirmation screen

  3. Map across the two attributes you just created on the Calculate action and the two Company Name attributes from the input on the confirmation screen

     How?

    Your Mappings setup should look similar to this:

  4. Hover over the Company Merger Confirmation  Open Screen action and click Confirm, then select anywhere on the canvas to connect to the Processing Phase

     Checkpoint

Testing

  1. Return to the Company Merger Pop up screen
  2. Select two companies from the drop downs and click Run Acquisition
  3. The Company Merger Confirmation screen should appear with the details of the selected companies mapped to the screen
    1. Choose Cancel or Confirm

Example 2: Multiple Confirmation Buttons

In this example, we'll configure a confirmation screen for a save company action that has two confirmation buttons - one button will just confirm the save and one button will confirm the save and create a new order for the company. 

Lookup Setup

  1. Open the Actionflow on the Save button on the Company Form
  2. Rename the Processing Phase to Save Only Phase
  3. Add a new phase after, Name: Save and Add Phase
  4. Add a new phase before the Save Only Phase, Name: Confirmation

Confirmation Phase Setup

  1. On the Confirmation Phase, configure an input of On Click
  2. Create an  Open Screen action to open the Company Form Confirmation screen
  3. Map on the input
  4. Right-click on the  Open Screen action and choose  Configure button mappings to see the mappings for both confirmation buttons
  5. Hover over the  Open Screen action to see the two output connections, then connect Confirm to the Save Only Phase, and ConfirmAndAdd to the Save And Add Phase

     Checkpoint

Save and Add Phase Setup

  1. On the Save And Add Phase, configure an input of the CompanyForm datasource
  2. Map the CompanyID and CompanyName attributes into the Actionflow
  3. Set up a  Save action to save data to the Companies table, ensuring Auto Save Attributes is toggled on
  4. Connect the input and map the CompanyID attribute to the Save action
  5. Create an  Open Screen action to open the Company Order Form screen
  6. Map the Save action to the Open Screen action
  7. On the Mappings between the Save and Open Screen actions:
    1. Map the CompanyName attribute from the input to the CompanyName attribute on the screen
    2. Map the CompanyID attribute from the table (not the input) to the Customer_ID attribute on the screen
      1. The CompanyID attribute is mapped from the table and not the input because for a new company an ID is not created until the record is saved to the table. If the CompanyID attribute was mapped from the input, it would be populated when saving an existing company but blank when creating a new company

         Checkpoint

Testing

  1. Open the Company Management screen
  2. Select either Add or Edit to open the Company Form
  3. Enter/change details for a company and press Save
  4. The confirmation screen will open, choose Yes + Create Order
  5. This will save the company and open the Company Order Form populated with the company name and ID of the company just created/edited