What is an Open Screen Action?
The Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
action opens new screens in PhixFlow. Open Screen actions run once per flow, or once after receiving the final record.
Creating Open Screen Actions
- Click the
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
icon in the toolbar to display existing screens in the application- Existing screens can be dragged from the Repository onto the canvas to automatically create an Open Screen node
- Alternatively, drag the
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
icon from the toolbar onto the canvas and follow the steps to create or open an existing screen
HTML Comment |
---|
|
Insert excerpt |
---|
| Open Screen Node |
---|
| Open Screen Node |
---|
nopanel | true |
---|
|
|
Worked Example
Here's a worked example using the School Data (available from the Learning Centre).
We want to be able to add and edit the courses. The first step to doing this is by creating two Open Screen Actionflows. Both will open the same screen containing an input form, 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?
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, this the data has and screens have already been pre-loaded into the Actionflow Application. For this example, we'll be working on the Course Management screen and opening the Course Form screen. |
In this example, we have are using:
- a screen containing a grid of the School Courses data
and we want to be able to add and edit these courses. The first step to doing this is by creating two Open Screen Actionflows. Both will open the same screen containing an input form, 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?- - the screen was created using the Tile with Buttons template
- a screen containing form fields for the School Courses data - the screen was created using the Edit Form template
To save the new or edited course, the Save Action on the input form must be configured. See 1.09 Save Action Configuration.
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
Create an Open Screen Action that opens an empty input form.
- On thescreen 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
- Click the
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
icon in the toolbar to display the existing screens in your application - Drag the your pre-made
Insert excerpt |
---|
| _screen_icon_only |
---|
| _screen_icon_only |
---|
nopanel | true |
---|
|
Course Form input form screen from the Repository onto the canvas to create an Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
node Select Click to Connect and for the input, choose the
Insert excerpt |
---|
| _actionflow_on_click |
---|
| _actionflow_on_click |
---|
nopanel | true |
---|
|
Action Event, then select Connect Input- Click On the canvas, click and drag the
Insert excerpt |
---|
| _driving_interface_connection_point |
---|
| _driving_interface_connection_point |
---|
name | icon |
---|
nopanel | true |
---|
|
icon onto the Insert excerpt |
---|
| _action_screen_icon |
---|
| _action_screen_icon |
---|
nopanel | true |
---|
|
Open Course Form Screen action node to connect the input to the action - Close the Actionflow to return to the Course Management screen
- the screen and press the button to see the Actionflow in action
- We can see that the Actionflow is working because it opens an empty form
Tip |
---|
title | Why do we use an On Click input? |
---|
|
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 run 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
Create an Open Screen Action that opens an input form containing data from the school courses grid.
- 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
- Click the
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
icon in the toolbar to display the existing screens in your application - Drag the Course Form screen your pre-made
Insert excerpt |
---|
| _screen_icon_only |
---|
| _screen_icon_only |
---|
nopanel | true |
---|
|
input 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 On the canvas, click and drag the
Insert excerpt |
---|
| _driving_interface_connection_point |
---|
| _driving_interface_connection_point |
---|
name | icon |
---|
nopanel | true |
---|
|
icon onto the Open Course Form node Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
action node to connect the input to the action - Right-click the connector between the node and
Insert excerpt |
---|
| _action_screen |
---|
| _action_screen |
---|
nopanel | true |
---|
|
node on the canvas - Choose
Insert excerpt |
---|
| _open_mappings |
---|
| _open_mappings |
---|
nopanel | true |
---|
|
and the Mappings window will open:- 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 action
- We can see that the Actionflow is working because it displays the data from the School Courses grid in the edit form
Tip |
---|
title | Why do we use a data source input? |
---|
|
A data source 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. |