Skip to main content

Using Global Fields

As described in the Inputs and Outputs section, certain blocks such as the "Form" block, output data as fields on the page. These fields can be used by subsequent blocks on the page to create dynamic content.

However, fields that are output by a block are only accessible to subsequent blocks on the same page where the block is placed. If you want to use the data from a field on another page, you can use the "Save to Global Field" block.

Save to Global Field

Global fields are accessible across all pages in your app. This means that you can save data to a global field on one page and then read that data on another page.

To save a field to a global field, follow these steps:

  • Add a 'Save to Global Field' block to your page.
  • Enter the value for the global field in the 'Save this value:' field. This value can be a plain text string, a page field, or any combination of both.
  • Set the name that the global field will be saved as in the 'As global field named:' field.

Once you have saved a value to a global field, you can read that value on any other page in your app using the 'Read Global Field' block.

Read Global Field

Once a value has been saved to a global field, you can read that value on any page in your app using the 'Read Global Field' block.

To read a global field value, follow these steps:

  • Add a 'Read Global Field' block to your page.
  • Type in the name of the global field you want to read from the 'Read global field:' input.
info

Before attempting to read a global field value, ensure that you have correctly saved data to a global field during your current user journey. If your users encounter a global field that has not been saved, they may see unexpected results.