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
- On the Companies List screen you created in 3. Screens Fundamentals, click the Add button under the grid
- The Company Form screen will open
- Right-click to Unlock the screen and click on the header, Company Details
- On the Properties tab, change the Default Value to
New Customer
- Apply the changes
- Close the Company Form screen
Task 2: Create an Actionflow for the 'Edit Customer' Header
- Right-click on the Edit button under the grid
- Select Display Actionflow
- On the Actionflow, in the toolbar, click and drag a Calculate Node onto the canvas
- Name it,
Details
- Press Create Action
- Name it,
- Move the Calculate Node into place between the two nodes on the canvas
- 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
- Under Connections, click on the input wire
- The Connector Mappings window will open:
- Drag the CompanyName attribute from the left ( Companies view) to the right (Connection point)
- Press Save
- On the Actionflow canvas, select the in wire, between the input node and Calculate node
- The Connector Mappings window will open:
- Drag the CompanyName attribute from the left (input) to the right (Calculate node)
- Press Save
- This maps the CompanyName attribute into the calculate node so it can be used in the calculation
Task 4: Setup the Calculate Node
- Click on the Details Calculate Node to open its Properties on the right
- In the Output Attributes section, click
- In the New Calculate Attribute window, add:
- Name:
pfTitle
- Expression:
"Editing: " + in.CompanyName
- Name:
- Save all changes
- In the New Calculate Attribute window, add:
- Pass this calculated value back to the screen by selecting the CompaniesForm wire between the Calculate Node and the Open Edit Form Node
- The Connector Mappings window will open:
- Drag the pfTitle attribute from the left (Calculate node) on top of the Header1Dynamic attribute on the right (Companies edit form)
- Press Save
- 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.
- Unlock the Companies Form
- Right-click the Save button and choose Display Actionflow
- On the Actionflow, select Properties from the toolbar
- In the Basic Settings, toggle on Perform Validation Before Running
- Apply the changes
- See the changes by adding a new record to the Companies grid but leave the Company Name field blank
- 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.