Get Page Variable
  • 02 Jun 2022
  • 5 Minutes to read
  • Dark

Get Page Variable

  • Dark

Article summary


The Get Page Variable step is used to pass Page parameters into a Flow based on the context of the Page, which is defined in the step properties. This step has several different Data Types that it can use to retrieve Page information.

This step has two main data categories which are the Page Context and the Output. Depending on the Page Context selection this step may also have an input. The Page Context options are:

Page Context Options
PageVariableGets data from a Report or Form on the Page through a selection bus.
FolderIdGets data from the FolderId of the Page that the user is navigated to.
URL VariableGets data from a variable within the URL.
CookieValueGets data from browser cookies.
The following examples go over the most popular Page Context options; URL Variable, Page Variable, and FolderId.

URL Variable Example

Follow this example to use the URL Variable Page Context option to retrieve the selected row from a Report, and display the data on the dashboard.

The following example involves designing a Page. For further information regarding Page design, see Create a Page or Dashboard. 
  1. From a Designer Project, select CREATE REPORT from the top Action bar and create a Page.
  2. From the Page Designer, drag a Report Viewer component from the Toolbox tab into the Page's workspace.
  3. Add a Simple Tile component from the TILES category in the Toolbox. 
  4. Select the Report Viewer to navigate to its Properties tab.
  5. Under REPORT SETUP, click the PICK DEFAULT REPORT button. Click CREATE, then Base Report. Name the Report, then click CREATE. 
  6. Click the Add button under Data Sources. Under the resulting Folder tree, expand the Common category select Account Data Source.
  7. Under Data Fields Add Email Address, Created By, and Created On Date.
  8. Select click Email Address under Data Fields to navigate to its Properties tab. 
  9. Check the Send Data As Filter Change Source box. Declare a name in the Filter Change Source Box.
    Remember this declared String value; it will act as the URL Variable that is used for data retrieval in this example. 

  10. Save, then close the Report Designer via X.

  11. From the Page Designer, click the Simple Tile, and then click the PICK FLOW button in the Properties tab.

  12. Click CREATE, then Tile Source Flow, provide a Name, then CREATE once more.

  13. In the Flow Designer, navigate to the Properties tab and select Page Context Flow Behaviour from the Behavior Type dropdown menu. 

    Page Context Aware Flow Behaviour
    Make sure to set this configuration first. If this is not configured then the Get Page Variable step will throw Errors. This setting is needed because the step can access at the runtime what page the user is actively viewing and any data contained within.

  14. Add a Get Page Variable step from the DASHBOARDS category of the Toolbox, in front of Create Tile Data step.

  15. Navigate to the Get Page Variable step's Properties tab by selecting the step.

    From the PAGE CONTEXT > Data Type dropdown menu, select URLVariable. Type in the previously declared Filter Change Source Data Name in the Variable Name text box. 

  16. Connect the Done path of the Get Page Variable step to the Create Tile Data step. 

  17. Navigate to the Create Tile Data's Properties tab. Select From Flow map Page Data to Line 3 under TILE SETUP

  18. Navigate to the End step Properties tab and map TIleData to the TILE DATA INPUTS

  19. Save and close the Flow. 

  20. From the Page Designer, select the Simple Tile and check the Update on selection bus change box under the BEHAVIOR category in the Properties tab.

  21. Declare the previously defined Filter Change Source Data Name.

  22. Save and close the Page. 

  23. Add the Page to a normal Folder as a Dashboard. Click various rows of the report to watch the Tile update with the corresponding email.

PageVariable Example

This example utilizes the Page Variable Page Context Option on the Get Page Variable step. This Page Context option can be used in a similar fashion to the previous example for displaying a Report based on a user selection. 

However, this example utilizes Page Variable in lieu of URL Variable.

  1. Adapt the previous Page to have a new Simple Tile, and then create a new Flow for that Tile. 
  2. From the Flow, navigate to the Properties tab. Under SETTINGS, set the Behavior Type to Page Context Aware Flow Behavior
  3. Add a Get Page Variable step from the DASHBOARDS category of the Toolbox, in front of Create Tile Data step.
  4. In front of the Get Page Variable step, add a Set Page Parameter step from INTEGRATION > INTERNAL SERVICES > PAGESERVICE
  5. Navigate to the Set Page Parameter step's Properties tab by selecting the step. Select From Flow map PageContextId to its respective Input.

    Build Data map the parm Input; Constant map MyParameter as the Name and Select From Flow map Flow Data.CurrentUserEmail.
  6. Select the Get Page Variable step; under Page Context, input the declared value from the Set Page Variable step in the Variable Name box.

  7. Select String [Text] from the Expected Type dropdown menu. 

  8. Connect the Done path of the Get Page Variable step to the Create Tile Data.

  9. Select the Create Tile Data step and map PageData to one of the Line inputs under TILE DATA

  10. Select the End step and map TileData to its respective Input.

  11. Save and close the Flow, then the Page.

  12. Return to the Dashboard in the Studio to view the Page Variable data via the second Tile. 

Folder ID Example

The example demonstrates how to use the FolderId Page Context. This setting retrieves the FolderId of the Page that it is tied to. This setting would be beneficial for creating a Custom Process View Page, Case Entities, Flow Execution Extension, or Folder Extension Data Structures

  1. Add another column or row to the Page that was used in the previous two examples. 
  2. Drag an additional Simple Tile into the newly established cell in the canvas. 
  3. Under COMMON PROPERTIES for the Simple Tile, CREATE the Tile Flow.
  4. Under the Properties tab for the Flow, change the Behavior to Page Context Aware Flow Behaviour via the dropdown menu. 
  5. Add a Get Page Variable step from the DASHBOARDS category of the Toolbox, in front of Create Tile Data step.
  6. Select the Get Page Variable step and select FolderId via the Data Type dropdown under Page Context
  7. Connect the Done path of the Get Page Variable step to the Create Tile Data step.
  8. Select the Create Tile Data step and map PageData to one of the Line inputs under TILE SETUP
  9.  Select the End step and map TileData to the Tile Data Input. 
  10. Save and close the Flow. 
  11. Save and close the Page.
  12. Navigate to the Folder associated with the Page to view the Tile that displaying the mapped FolderId.

Was this article helpful?