Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
Actionflows can be used This page is for application designers who want to pass data changes between screens, itMoving data between screens is achieved through an ActionFlow and form fields on a screen. In this example, we have a Company Name form field on Screen 1 that we will pass to Screen 2 using an actionflow. This is illustrated below:
Passing Data between Screens
.
Overview
Sometimes an application user will make changes to data fields, and then expect to see those changes reflected on the next screen they use. In this case, use an actionflow to pass data between screens.
Note |
---|
When passing data between screens: only a single record can be sent from one screen to another, and it can only be passed to a form. |
This setup assumes Screen 1 has Company Data already displayed on it. Example company data is available from the Learning Centre. See Designing Screens for guidance on setting up screens.
see Understanding
|
The examples used on this page assume Screen1 has a form field called Company Name, which displays data. Changes to the Company Name data has to be passed to Screen2, as shown below:
Tip |
---|
You can download the example data from the PhixFlow Learning Centre. |
See the Screens topic for information about creating and designing screens.
Configuring Actionflows to Pass Data
The following instructions assume you know how to set up an actionflow; see Actionflows.
Step 1 Create the
Actionflowactionflow
Find
Screen 2Screen2 in the repository and
draggingdrag it onto the
screen 1Screen1 canvas. PhixFlow automatically creates a button with an actionflow that opens
screen 2Screen2; see Adding a Button to Open a Screen
.Right.
Note This actionflow only opens the new screen. You need to make changes to the actionflow so that the data is passed to Screen2.
- In the Screen1 canvas, right-click on the new button and select Display Actionflow to open the actionflow diagram.
Step 2 Configure the
Actionflowactionflow
In the actionflow diagram, in the actionflow Inputs panel, click on the On-Click Event event and select the source origin of your the data. In this example the origin is Screen1. PhixFlow opens the Mappings window.
tipIf you need to change the mapping later, to reopen the Mappings window, right-click on the line between the source of data and the connection point, then click.Insert excerpt _mapping _mapping .Drag the attributes you want to pass to the next screen from the left box to the right box.nopanel true
In the example screenshots, we will pass on theCompany Name
shown below, the left box lists the attributes available to Screen1 and we dragCompany Name
to the right box, which lists attributes available to Screen2.- In the example aboveactionflow, the PhixFlow creates a connector called screen only called screen between in and Screen2 that only opens the screen. In In this case we need to pass data. This This means we need to remove the connector and create a new one.
- To remove the connector, in the actionflow, right-click on the connector to screen 2 and select Remove Connector, then Confirm the removal.
- Connect Reconnect the Inputs → → in connection point to Open (Screen 2). In the popup, select This time, PhixFlow opens a popup menu. Select Form, which allows data to pass. When prompted, select Screen 2.
- In the Mapping window, map remap the attributes you want to pass to Screen 2. For this example, we will pass on
Company Name
Screen2.
- Close the actionflow.
Tip | ||||||||
---|---|---|---|---|---|---|---|---|
If you need to change the mapping later, to reopen the Mappings window, right-click on the line between the source of data and the connection point, then click
|
Step 3 Test the actionflow configuration
- Open the screen 1 Screen1 canvas and switch to
; see Design and Application Mode.Insert excerpt _app_mode _app_mode nopanel true - In screen 1Screen1, edit a the data in the
Company Name
field and click the button.Screen 2 opens with the data for theCompany Name
attribute including the latest edits - The application opens Screen2. The
Company Name
field should display your changes.
Passing a
CalculateCalculated Value to Another Screen
Anchor | ||||
---|---|---|---|---|
|
This example builds on the example above. we will now insert a calculated value into the actionflow created above to add a value that then gets passed to a second screen.
Step 1 Update Screen 2
Open Screen 2 and addWhen an application user moves from one screen to another, you may want to provide a new value on the second screen.
The following instructions explain how to calculate a value in the actionflow and then pass it to a screen.
Step 1 Create the form field
- Open Screen2.
- Add a form field from the palette that will be used to
This field will hold the calculated value we want to pass acrossto Screen2.
In our the example this is called, calledCalculatedValue
. - Close the screenScreen2.
We now need to tell the actinflow about this change
Open Screen 1,Step 2 Update the actionflow
- Open Screen1 and unlock it if necessary, right
- Right-click on the button that opens Screen 2 Screen2 and select Display Actionflow.
- Open In the Screen 2 node from the actionflow, from the click on the Screen2 node to open its properties.
- In
→ Input Connection Points open section, double-click the component where the data will be displayed by double-clicking on it. to open its connection point properties.Insert excerpt _property_tabs _property_tabs name basic nopanel true
In our example this is Screen 2Screen2. - In the window that opens, in the Attributes sectionconnection point properties →
→ Attributes section toolbar, clickInsert excerpt _property_tabs _property_tabs name basic nopanel true
. and from the screen that opens dragInsert excerpt _attributes _attributes nopanel true - PhixFlow opens the list of attributes that are available. Drag the new
CalculateValue
filed into this attribute section attribute into the Attributes section, as shown below.
Step
1 Update3 Calculate the
Actionflowvalue
- From the context actionflow toolbar, drag a
onto the canvas. Provide a useful name. This type of node can perform calculations; see Calculate Node Properties.Insert excerpt _actionflow_calculate _actionflow_calculate nopanel true - Enter a name for the node and save your changes. In our example this is called
CalculateValue
. - In here you can perform any calculation see Calculate Node. Save your changes.
- Remove the connection between in and Screen 2.
- Connect Reconnect the in connection point to the
.Insert excerpt _actionflow_calculate _actionflow_calculate nopanel true - Connect
CalculateValue
to Screen 2 Screen2 using the Screen 2 Screen2 form.
Updating Values on an Existing Screen
PhixFlow can update the values on a screen, for example a . For example, an application user enters a date and needs wants to calculate the number of working days to that date.
- Add a button to your screen.See Designing Screens.
- Right-click on the button , and select
.Insert excerpt _actionflow_add _actionflow_add nopanel true - Create you an actionflow and add nodes to perform the required functionality, for example calculate the number of working days until a selected date. See Understanding Actionflows for assistance; see Actionflows and Using Actionflow Nodes.
- In the connection points, click
:Insert excerpt _Add _Add nopanel true - Enter a Name.
- Select the Output.
In the
screen that openspopup window, select the form to which you
wishwant to write
thedata
back to. Note you.
backNote You can only write
, youdata to a form field
. You cannot write back to any other view type, such as a grid or card.
- Map your outgoing attributes to the available attributes. See ; see Wiring Actionflows.
When the actionflow runs it will output the value from the actionflow to a form field in your original screen.