Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
By the end of this chapter you will understand what an Open Screen action is and how to use them, and you will have created an Open Screen Actionflow in your application.
What is an Open Screen Action?
The
action opens new screens in PhixFlow. Open Screen actions run once per flow, or once after receiving the final record. Insert excerpt _action_screen _action_screen nopanel true
Creating Open Screen Actions
- Click the
icon in the toolbar to display any existing screens in the applicationInsert excerpt _action_screen _action_screen nopanel true - Existing screens can be dragged from the Repository onto the canvas to automatically create an Open Screen node
- Alternatively, drag the
icon from the toolbar onto the canvas and follow the steps to create or open an existing screenInsert excerpt _action_screen _action_screen nopanel true
HTML Comment | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
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. |
In this example, we want to be able to add and edit courses in the School Courses grid on the Course Management screen. The first step to doing this is by creating two Open Screen Actionflows. Both will open the same screen but when we are adding a new course, we want an empty input form, and when we are editing an existing course, we want the input form to contain course data. SCREENSHOTS?
We will configure the Save and Delete Actions on the input form in a later chapter on this course.
Note: When creating a new screen in PhixFlow, a Grid Actions wizard can configure the Create, Read, Update and Delete (CRUD) actions for you. For the purposes of understanding the mechanics of Actionflows, we will create these manually.
Open Screen to Add New Data
description?
- On the Course Management screen, where the Actionflow will be initiated from, right-click on the button and choose
Insert excerpt _actionflow_add _actionflow_add nopanel true - Enter a name for the Actionflow,
- Name:
Add Course
- Select Confirm
- Name:
- Click the
icon in the toolbar to display the existing screens in your applicationInsert excerpt _action_screen _action_screen nopanel true - Drag the
Course Form screen from the Repository onto the canvas to create anInsert excerpt _screen_icon_only _screen_icon_only nopanel true
nodeInsert excerpt _action_screen _action_screen nopanel true Select Click to Connect and for the input, choose the
Action Event, then select Connect InputInsert excerpt _actionflow_on_click _actionflow_on_click nopanel true - Click and drag the
icon onto theInsert excerpt _driving_interface_connection_point _driving_interface_connection_point name icon nopanel true
Open Course Form node to connect the input to the actionInsert excerpt _action_screen_icon _action_screen_icon nopanel true - Close the Actionflow to return to the Course Management screen
the screen and press the button to see the Actionflow in actionInsert excerpt _lock _lock nopanel true - We can see that the Actionflow is working because it opens an empty form
Tip | ||
---|---|---|
| ||
An input of On Click means that the Actionflow is initiated by the user clicking a button. We use an input of On Click where an Actionflow does not require any data to perform the action. In the exercise above, we are creating an Actionflow that opens a screen where new courses will be created, therefore no data needs to be transferred across to the Course Form screen when it is opened. |
Open Screen to Edit Existing Data
description?
- On the Course Management screen, where the Actionflow will be initiated from, right-click on the button and choose
Insert excerpt _actionflow_add _actionflow_add nopanel true - Enter a name for the Actionflow,
- Name:
Edit Course
- Select Confirm
- Name:
- Click the
icon in the toolbar to display the existing screens in your applicationInsert excerpt _action_screen _action_screen nopanel true - Drag the Course Form screen from the Repository onto the canvas to create an Open Screen node
- Select Click to Connect and for the input, choose the School_Courses View Component, then select Connect Input
- The Mappings window will open:
- Drag the CourseID attribute from the left (Grid) to the right (Connection Point Interface), then click Save
- Click and drag the
icon onto the Open Course Form node to connect the input to the actionInsert excerpt _driving_interface_connection_point _driving_interface_connection_point name icon nopanel true - Right-click the connector between the
node andInsert excerpt _input _input nopanel true
node on the canvasInsert excerpt _action_screen _action_screen nopanel true - Choose
and the Mappings window will open:Insert excerpt _open_mappings _open_mappings nopanel true - Drag the CourseID attribute from the left (Actionflow) to the right (Screen), then click Save
- Close the Actionflow to return to the Course Management screen
the screen and press the button to see the Actionflow in actionInsert excerpt _lock _lock nopanel true - We can see that the Actionflow is working because it displays the data from the School Courses grid in the edit form
Tip | ||
---|---|---|
| ||
A datasource input means that the Actionflow requires data to perform the action. In the exercise above, we are creating an Actionflow that opens a screen where existing courses will be edited, therefore data needs to be transferred from the School Courses grid, through the Actionflow and out to the Course Form screen. |