4. Actionflow Fundamentals

Introduction

Welcome to the Actionflow Fundamentals. In this chapter we will learn about all the key techniques and principles to create our Actionflows in PhixFlow which allow us to interact with our data..

Concepts

To find out more about the key concepts for ActionFlows before you take the course below, or simply to refresh your memory, see Understanding Actionflows.

Video Demonstration 

Watch the video demonstration, then complete the Fundamentals Tasks below.



Fundamentals Tasks

Complete the tasks below, before moving to the next chapter. 

Task 1: Change the 'Add Customer' Header

  1. On the Companies List screen you created in 3. Screens Fundamentals, click the Add button under the grid
  2. The Company Form screen will open
  3. Right-click to  Unlock the screen and click on the header, Company Details
  4. On the  Properties tab, change the Default Value to New Customer
  5.  Apply the changes
  6.  Close the Company Form screen

Task 2: Create an Actionflow for the 'Edit Customer' Header

  1. Right-click on the Edit button under the grid
  2. Select  Display Actionflow
  3. On the Actionflow, in the toolbar, click and drag a  Calculate Node onto the canvas
    1. Name it, Details
    2. Press Create Action
  4. Move the  Calculate Node into place between the two nodes on the canvas
    1. To do this, click and drag the  Calculate Node onto the CompaniesForm wire between the two nodes on the canvas until a  icon appears - drop the Calculate node onto this icon

Task 3: Configure the Input Mappings

  1. Under Connections, click on the input wire
  2. The  Connector Mappings window will open:
    1. Drag the CompanyName attribute from the left ( Companies view) to the right (Connection point)
    2. Press Save
  3. On the Actionflow canvas, select the in wire, between the input node and Calculate node
  4. The  Connector Mappings window will open: 
    1. Drag the CompanyName attribute from the left (input) to the right (Calculate node)
    2. Press Save 
      1. This maps the CompanyName attribute into the calculate node so it can be used in the calculation

Task 4: Setup the Calculate Node

  1. Click on the Details  Calculate Node to open its  Properties on the right
  2. In the Output Attributes section, click 
    1. In the New Calculate Attribute window, add:
      1. Name: pfTitle
      2. Expression: "Editing: " + in.CompanyName
      3.  More information on this expression

        In Expressions, quotation marks, " and ", are used to denote strings. Strings are characters (e.g. letters, numbers, spaces or special characters) that PhixFlow interprets as text.

        You can see the attributes you have mapped into the Calculate Node after typing in.

    2. Save all changes
  3. Pass this calculated value back to the screen by selecting the CompaniesForm wire between the  Calculate Node and the  Open Edit Form Node
  4. The  Connector Mappings window will open:
    1. Drag the pfTitle attribute from the left (Calculate node) on top of the Header1Dynamic attribute on the right (Companies edit form)
    2. Press Save
  5. See the changes in action by pressing the Edit button on the Companies List screen to open the Companies Form

Task 5: Setup Validation

This task is only necessary if you are using PhixFlow version 10 or older.

Users of PhixFlow version 10.1 and beyond do not need to complete this task because the Validate Before Running option on the Save Actionflow is toggled on by default.

 How do I check my PhixFlow version?

In the top right corner of PhixFlow, hover over the  Administration icon and select  About PhixFlow.

  1.  Unlock the Companies Form
  2. Right-click the Save button and choose  Display Actionflow
  3. On the Actionflow, select  Properties from the toolbar
  4. In the Basic Settings, toggle on  Perform Validation Before Running
  5.  Apply the changes
  6. See the changes by adding a new record to the Companies grid but leave the Company Name field blank
  7. Press Save and the Validation Failed error message will show

Further Reading (Optional)

For more information on the topics covered in this chapter, see the below links.