Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Overview

Actionflows can be used to pass data 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


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.

  1. 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.
  2. Edit the Actionflow
    1. Click on the On-Click Event, select the datasource that has your data. For example Screen 1 form.
    2. The mapping screen will open.
      1. Note this can be accessed later by right-clicking on the line between the datasource and the connection point, and clicking  Add Mapping.
    3. Drag the required attributes you wish to pass to the next screen In our example we will send the Company Name
    4. The following illustrates these steps:
    5. 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.
    6. Confirm the removal.
    7. Connect the in connection point to Open (Screen 2). This time we will select the Form as this allows us to pass data. When prompted select Screen 2.
    8. In the mapping screen which opens, map the required attributes you wish to pass to Screen 2. For this example we will send the Company Name.
    9. The following illustrates these steps:
    10.  
    11. Close the actionflow.
  3. Testing the setup
    1. Ensure you have Screen 1 open and switch PhixFlow into Application mode. See Design and Application Mode if you require assistance.
    2. Click your button and now when Screen 2 opens the Company Name is passed from Screen 1 to Screen 2, along with any edits.

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.

  1. Update Screen 2
    1. 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.
    2. Close the screen.
    3. We now need to tell the actinflow about this change
    4. Open Screen 1, unlock it if necessary, right-click on the button that opens Screen 2 and select Display Actionflow.
    5. Open the Screen 2 node from the actionflow, from the Input Connection Points open the component where the data will be displayed by double-clicking on it. In our example this is Screen 2.
    6. In the window that opens, in the Attributes section, click Attributes and from the screen that opens drag the new CalculateValue filed into this attribute section.
  2.  Update the Actionflow
    1. From the context toolbar drag a  Calculate onto the canvas. Provide a useful name. In our example this is called CalculateValue.
      1. In here you can perform any calculation see Calculate Node. Save your changes.
    2. Remove the connection between in and Screen 2.
    3. Connect the in connection point to the  Calculate.
    4. Connect CalculateValue to Screen 2 using the Screen 2 form.

Updating Values on an Existing Screen

PhixFlow can update the values on a screen, for example a user enters a date and needs to calculate the number of working days to that date.

  1. Add a button to your screen.
    1. See Designing Screens.
  2. Right-click on the button, select  Add Actionflow.
  3. Create you actionflow to perform the required functionality, for example calculate the number of working days until a selected date. See Understanding Actionflows for assistance.
  4. In the connection points click  Add New:
    1. Provide a meaningful Name.
    2. Select Output
  5. In the screen that opens select the form you wish to write the data back to. Note you can only write back to a form field, you cannot write back to any other view type.
  6. Map your outgoing attributes to the available attributes. See Wiring Actionflows.

When the actionflow runs it will output the value from the actionflow to your original screen.


  • No labels