Project Dataflow
Project Dataflow is the dataflow model whose parent is the project. Project Dataflow is similar to dataflow for any other parent object, with two differences:
- Project Dataflow is always running when the project is open.
You can bind from Project Dataflow into any dataflow model in the project.
You cannot bind from another dataflow model into Project Dataflow, because other dataflow models are not available when their parent pages are closed. Instead, you can use actions to write to Project Dataflow, as described in this tutorial: How to Cause User Interaction within a Page Include to Affect the Outer Page.
In Page Model syntax, the root of the Project Dataflow is @lib
.
How to Open Project Dataflow
To open Project Dataflow:
- Ensure the relevant project is open.
- In the Main Menu, select Modify > Project Dataflow.
Alternatively, after you have added one or more blocks to Project Dataflow, you can also open Project Dataflow via the Project panel:
- Open the file
project.df5
, located in the project root.
How to Save Project Dataflow
To continually save all changes to Project Dataflow, check the check box for Auto-Save.
If the check box is unchecked, then your changes are held in browser memory for this session, but you must click Save to save the changes. If the check box is unchecked and you refresh the browser or leave the project, then your changes are lost.
The Auto-Save check box is shown in the following image.
Tutorial: Write to Project Dataflow
This tutorial creates a Set State action that writes a value to the Project Dataflow when invoked. This allows you to create a global variable that can be used across pages.
- Add a list input component to the stage.
- Choose Modify > Project Dataflow.
- Add a String block to the Project Dataflow.
- With the list input component selected, click Add Action, and choose Set State.
Open the component's dataflow, and bind the list input component's Value property to the State block's invoke property.
Now the action will be invoked whenever the value property changes.
- Record the action:
- With the list input component selected, in the Actions panel, hover over the action, and then click Record.
- While recording, change the value of the String block in the Project Dataflow to a dummy value such as 0.
- Click Finish Recording State.
Open the input component's dataflow, and bind the input component's value property to the State block's change 0 property. This replaces the dummy value.
Now the value of the String block is changed to the same value as the list component, whenever the value property changes.