Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

What is a Bulk Update Action?

Image Removed

The  Insert excerpt_action_bulkupdate_action_bulkupdatenopaneltrue action updates records in bulk in a table, including saving new records. Only records which satisfy the specified filter criteria set on the node will be updated. 

Note: Bulk Update actions will only update records in tables with the Period of Transactional.

Custom Confirmation Messages

Image Added

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.

Panel
borderColorgrey
borderWidth2
borderStyledashed

The below text is taken from 1.13 Confirmation Message Configuration.

Insert excerpt
1.

09 Save Action

13 Confirmation Message Configuration
1.

09 Save Action

13 Confirmation Message Configuration
name

TablePeriod

CreateConfirmScreen
nopaneltrue

Configuring Custom Messages

  1. On your confirmation screen, add dynamic text and static text components, as required, to create your message
    1. Image Added
    2. 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
  2. Open the Actionflow containing the Confirmation
    Insert excerpt
    _action_
save
  1. phase
    _action_
save
  1. phase
    nopaneltrue
 vs 
  1. Within the Confirmation
    Insert excerpt
    _action_
bulkupdate
  1. phase
    _action_
bulkupdate
  1. phase
    nopaneltrue
 The key difference between 
  1. , map the attributes from the initiator screen onto the dynamic text components, e.g. company name
  2. Create counts by configuring lookups to additional data, then using countElements within an Output Attribute on a 
    Insert excerpt
    _action_
bulkupdate
  1. calculate
    _action_
bulkupdate
  1. calculate
    nopaneltrue
 and 
  1.  action
    1. See below worked example for full details on how to do this

Configuring Multiple Confirmation Buttons

  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 
    Insert excerpt
    _
action
  1. property_
save
  1. tabs
    _
action_save

To update records and persist the audit history of the record, see 1.09 Save Action Configuration.  

Creating Bulk Update Actions

  1. property_tabs
    nameaction
    nopaneltrue
 is that the Bulk Update action will not update the audit history of records where Audit Manual Changes has been enabled.A filter must be set for the Bulk Update action to run. Set this in the Data Retrieval Options section of the  
  1. Click the 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 
    Insert excerpt
    _action_
    bulkupdate
    screen
    _action_
    bulkupdate
    screen
    nopaneltrue
     icon in the toolbar to display any existing tables in the applicationExisting tables can be dragged from the Repository onto the canvas, then choose  action for the confirmation screen
  2. Right-click on the 
    Insert excerpt
    _action_
    bulkupdate
    screen
    _action_
    bulkupdate
    screen
    nopaneltrue
     to create a Bulk Update node and choose Alternatively, drag the 
    Insert excerpt
    _
    action
    mappings_
    bulkupdate
    configure
    _
    action_bulkupdate
    mappings_configure
    namebutton
    nopaneltrue
     icon from the toolbar onto the canvas
  3. In the Create Bulk Update Action window:
    1. Enter a Name
    2. Choose to Allow Audited Table to display tables with Audit Manual Changes enabled in the Table drop down
      1. By default, tables with Audit Manual Changes enabled are not shown in the Table drop down list
    3. Choose the Table from the drop down where the records will be updated
      1. Or click the table icon to display tables in the Repository
    4. Select Create Action

When creating update actions it can be useful to set up confirmation messages that allow users to confirm or cancel the update. See 1.13 Confirmation Message Configuration.

Setting Update Action Filter Criteria

  1. Create mappings for each confirmation button and click Confirm Mappings
  2. Hover over the 
    Insert excerpt
    _
property
  1. action_
settings
  1. screen
    _
property
  1. action_
settings
  1. screen
    nopaneltrue
.
  1. Choose a Data Range from:
    1. Latest: selects data from the latest recordsets
    2. All: selects data from all recordsets (default)
  2. Set the Filter Criteria to specify which records will be selected for deletion. See Filter → Filter Details
    1. Incoming attributes mapped to the Bulk Update node can be referenced in the Data Retrieval Options using the syntax, ConnectorName.AttributeName, e.g. in.MyAttribute
HTML Comment
hiddentrue
Insert excerptBulk Update NodeBulk Update Nodenopaneltrue
  1.  node to see the additional output connections
    1. Image Added

Worked Example

Here's a worked example using the Company Data (available from the Learning Centre).

In this example, we are using:  

  • Company Rejected CompaniesManagement screen containing three grids a grid of the Companies , Orders and OrderLines data 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
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 Management screen.

Bulk Update Company Employees

Merger Confirmation screen.

Prerequisites

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

Expand

Insert excerpt
3.03 Bulk Update Action Configuration
3.03 Bulk Update Action Configuration
nameBulkUpdateExample
nopaneltrue

Example 1: Custom Merger Message

In this example, a company is being taken over by another company and we need to update all employees to reflect their new CompanyID.

Actionflow

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.

Lookup Setup

  1. Open the Company Management screenCreate an 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
    Insert excerpt
    _action_phase
    _action_phase
    nopaneltrue
     before the Processing Phase
    Create 
    1. Name: RunCompanyAcquisition
  4. Configure the input connection point to the Companies data on the screen
  5. On the Mappings window, ensure Page is selected for What data is being used?
    1. Image Removed
  6. Map in CompanyID
    1. : Confirmation 
  7. Select the CompanyMerger datasource as the Input 
  8. Map into the Actionflow the four attributes from the screen:
    1. CompanyIDBeingAcquired
    2. CompanyIDDoingAcquiring
    3. CompanyNameBeingAcquired
    4. CompanyNameDoingAcquiring
  9. Setup a 
    Insert excerpt
    _action_calculate
    _action_calculate
    nopaneltrue
     action that will be used to process the lookup data
  10. Configure lookups to retrieve the Employees and Orders for the company that is being acquired
Expand
titleHow to Configure the Employees Lookup

Hover over the 

Insert excerpt
_action_calculate
_action_calculate
nopaneltrue
 action and choose Add Lookup

Give the lookup a suitable name

Click onto the canvas, then enter a suitable name for the 

Insert excerpt
_action_view
_action_view
nopaneltrue
 and choose the Employees Primary Table

Select an Output Attribute of EmployeeID, then select Next

For the Incoming Mappings, choose CompanyIDBeingAcquired, then select Next

For the Outgoing Mappings, map across EmployeeID to the Calculate action, then select Confirm and create filter

For the filter, match the CompanyID in the data to the Incoming Mapping


Expand
titleCheckpoint

Image Added


Expand
titleHow to Configure the Orders Lookup

This is configured in exactly the same way as the Employees lookup, with the following changes:

For the 

Insert excerpt
_action_view
_action_view
nopaneltrue

 actions for the Orders and OrderLines data

These should contain filters so only the Orders and OrderLines for the companies with a Status of Rejected are mapped

Expand
titleCheckpoint

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 updated

     choose the Employees Primary Table

    Select an Output Attribute of Order_ID

    For the Outgoing Mappings, map across Order_ID to the Calculate action

    For the filter, match the Customer_ID in the data to the Incoming Mapping


    Expand
    titleCheckpoint

    Image Added

    Count and Open Screen Setup

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

      Expand
      titleHow?
      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 Caqlcxulate action, then clikc on the canvas to create an 

      Insert excerpt
      _action_screen
      _action_screen
      nopaneltrue
       action for the Company Merger Confirmation screen


    3. Hover over the Company Merger Confirmation 

      Insert excerpt
      _action_screen
      _action_screen
      nopaneltrue
       action and click Confirm, then select anywhere on the canvas to connect to the Processing Phase

      Expand
      titleCheckpoint

      Image Added


    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
      1. Image Added

    Confirmation Phase Setup

    1. On the Confirmation Phase, configure an input of On Click
    2. Create an 
      Insert excerpt
      _action_screen
      _action_screen
      nopaneltrue
       action to open the Company Form Confirmation screen
    3. Right-click on the 
      Insert excerpt
      _action_screen
      _action_screen
      nopaneltrue
       action and choose 
      Insert excerpt
      _mappings_configure
      _mappings_configure
      namebutton
      nopaneltrue
    4. Create an additional mapping for the ConfirmAndAdd button
    5. Hover over the 

      Insert excerpt
      _action_screen
      _action_screen
      nopaneltrue
       action to see the two output connections, then connect Confirm to the Save Only Phase, and ConfirmAndAdd to the Save And Add Phase

      Expand
      titleCheckpoint

      Image Added


    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 
      Insert excerpt
      _action_save
      _action_save
      nopaneltrue
       action to save data to the Companies table, ensuring Auto Save Attributes is toggled on
    4. Map the CompanyID attribute to the Save action
    5. Create an 
      Insert excerpt
      _action_screen
      _action_screen
      nopaneltrue
       action to open the Company Order Form screen
    6. 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

          Expand
          titleCheckpoint
    Image Removed
        1. Image Added

    Image RemovedImage Removed

    Testing

  • Return to the Company Rejected Companies screen
  • Press Bulk Delete button
  • Refresh the data in each grid to see the results

    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