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.

  • Create the Actionflow
    1. Open Screen 1 and add a button with an actionflow that opens Screen 2. See Understanding Actionflows.
      1. A shortcut for doing this is to find Screen 2 in the repository and dragging it onto Screen 1, PhixFlow automatically creates a button and actionflow that opens Screen 2.
    2. Open the actionflow by right-clicking the button on Screen 1 and selecting Display Actionflow.
  • Edit the Actionflow
  • Click on the On-Click Event, select the datasource that has your data. For example Screen 1 form.
  • The mapping screen will open.Note this can be accessed later by right-clicking on the line between the datasource and the connection point, and clicking Insert excerpt_mapping_mappingnopaneltrue.
  • Drag the required attributes you wish to pass to the next screen In our example we will send the Company Name
  • The following illustrates these steps:
  • Image Removed
  • Right-click on the connector, screen, connected to your Screen 2 and select Remove Connector.
    1. Connecting using screen, only opens the screen, we need to pass data. Therefore we will connect to the form in the next steps.
  • Confirm the removal.
  • Connect the

    • 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

    1. Find Screen2 in the repository and drag it onto the Screen1 canvas. PhixFlow automatically creates a button with an actionflow that opens Screen2; see Adding a Button to Open a Screen.

      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

    1. In the actionflow Inputs panel, click on the On-Click event and select the origin of the data. In this example the origin is Screen1. PhixFlow opens the Mappings window.

    2. Drag the attributes you want to pass to the next screen from the left box to the right box.
      In the example shown 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.

      Image Added

    3. In the actionflow, PhixFlow creates a connector called screen between in and Screen2 that only opens the screen. In this case we need to pass data. 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. Reconnect the Inputs → in connection point to Open (Screen 2). This time we will select the Form as this allows us to pass data, PhixFlow opens a popup menu. Select Form, which allows data to pass. When prompted, select Screen 2.
    6. In the mapping screen which opens, map the required Mapping window, remap the attributes you wish want to pass to Screen 2. For this example we will send the Company Name.The following illustrates these steps:Screen2. 
      Image Modified 
    7. Close the actionflow.Testing the setup


    Passing a Calculate Value to Another Screen

    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.

    Update Screen 2
  • Open Screen 2 and add a form field from the palette that will be used to hold the calculated value we pass across. In our example this is called, CalculatedValue.
    1. Image Removed
  • Close the screen.
  • We now need to tell the actinflow about this change
  • Open Screen 1, unlock it if necessary, right
    Tip
  • Ensure you have Screen 1 open and switch PhixFlow into Application mode. See Design and Application Mode if you require assistance.
  • Click your button and now when Screen 2 opens the Company Name is passed from Screen 1 to Screen 2, along with any edits.
  • 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 Screen1 canvas and switch to
      Insert excerpt
      _app_mode
      _app_mode
      nopaneltrue
      ; see Design and Application Mode.
    2. In Screen1, edit the data in the Company Name field and click the button.
    3. The application opens Screen2. The Company Name field should display your changes.

    Passing a Calculated Value to Another Screen 
    Anchor
    calculated
    calculated

    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
      This field will hold the calculated value we want to pass to Screen2.
      Image Added
      In the example this is called CalculatedValue.
    3. Close Screen2.

    Step 2  Update the actionflow

    1. Open Screen1 and unlock it if necessary
    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.
      Image Modified

    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.
      Image Modified Update

    Step 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.In here you can perform any calculation see Calculate Node. Save your changes.
    3. Remove the connection between in and Screen 2.
    4. Connect Reconnect the in connection point to the 
      Insert excerpt
      _actionflow_calculate
      _actionflow_calculate
      nopaneltrue
      .
    5. 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.