Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue

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:

Image Removed

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

  • You have to pass the data from a form field to a form field
  • You can only pass one record.

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:

Image Added

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

Actionflow

actionflow

  1. Find

    Screen 2

    Screen2 in the repository and

    dragging

    drag it onto the

    screen 1

    Screen1 canvas. PhixFlow automatically creates a button with an actionflow that opens

    screen 2

    Screen2; 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.


  2. In the Screen1 canvas, right-click on the new button and select Display Actionflow to open the actionflow diagram.

Step 2  Configure the

Actionflow

actionflow

  1. 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.

    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. 

  2. Insert excerpt_mapping_mappingnopaneltrue.Drag the attributes you want to pass to the next screen from the left box to the right box.
    In the example screenshots, we will pass on the Company Nameshown below, the left box lists the attributes available to Screen1 and we drag Company Name to the right box, which lists attributes available to Screen2.



  3. 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.
  4. To remove the connector, in the actionflow, right-click on the connector to screen 2 and select Remove Connector, then Confirm the removal.
  5. 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.
  6. In the Mapping window, map remap the attributes you want to pass to Screen 2. For this example, we will pass on Company NameScreen2
     
  7. 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 

Insert excerpt
_mapping
_mapping
nopaneltrue
.

Step 3  Test the actionflow configuration

  1. Open the screen 1 Screen1 canvas and switch to
    Insert excerpt
    _app_mode
    _app_mode
    nopaneltrue
    ; see Design and Application Mode.
  2. In screen 1Screen1, edit a the data in the Company Name field and click the button.Screen 2 opens with the data for the Company Name attribute including the latest edits
  3. The application opens Screen2. The Company Name field should display your changes.

Passing a

Calculate

Calculated Value to Another Screen 
Anchor
calculated
calculated

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 add

When 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

  1. Open Screen2.
  2. 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.
    Image Added
    In our the example this is called, called CalculatedValue.
    Image Removed
  3. Close the screenScreen2.

We now need to tell the actinflow about this change

Open Screen 1,

Step 2  Update the actionflow

  1. Open Screen1 and unlock it if necessary, right
  2. Right-click on the button that opens Screen 2 Screen2 and select Display Actionflow.
  3. Open In the Screen 2 node from the actionflow, from the click on the Screen2 node to open its properties.
  4. In
    Insert excerpt
    _property_tabs
    _property_tabs
    namebasic
    nopaneltrue
     → 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.
    In our example this is Screen 2Screen2.


  5. In the window that opens, in the Attributes sectionconnection point properties → 
    Insert excerpt
    _property_tabs
    _property_tabs
    namebasic
    nopaneltrue
     → Attributes section toolbar, click 
    Insert excerpt
    _attributes
    _attributes
    nopaneltrue
    . and from the screen that opens drag
  6. 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  Update

3 Calculate the

Actionflow

value

  1. From the context actionflow toolbar, drag a 
    Insert excerpt
    _actionflow_calculate
    _actionflow_calculate
    nopaneltrue
     onto the canvas. Provide a useful name. This type of node can perform calculations; see Calculate Node Properties.
  2. Enter a name for the node and save your changes. In our example this is called CalculateValue.
  3. In here you can perform any calculation see Calculate Node. Save your changes.
  4. Remove the connection between in and Screen 2.
  5. Connect Reconnect the in connection point to the 
    Insert excerpt
    _actionflow_calculate
    _actionflow_calculate
    nopaneltrue
    .
  6. 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.

  1. Add a button to your screen.See Designing Screens.
  2. Right-click on the button , and select 
    Insert excerpt
    _actionflow_add
    _actionflow_add
    nopaneltrue
    .
  3. 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.
  4. In the connection points, click 
    Insert excerpt
    _Add
    _Add
    nopaneltrue
    :
      Provide a meaningful
      • Enter a Name.
      • Select the Output
    • In the

      screen that opens

      popup window, select the form to which you

      wish

      want to write

      the

      data

      back to. Note you

      .

      Note

      You can only write

      back

      data to a form field

      , you

      . 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.