Get Page Variable
  • 07 Nov 2022
  • 4 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Get Page Variable

  • Dark
    Light

Article summary

Overview

The Get Page Variable step is used to pass Page parameters into a Flow based on the Page's context. This step has several different data types that it can use to retrieve Page information. This step has two main data categories: the 'Page Context' and the 'Output'. This step may also have an input depending on the Page Context selection. 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 that the Page is attached to
URL VariableGets data from a variable within the URL
CookieValueGets data from browser cookies
These article examples will go over the most popular page context options: URL Variable, Page Variable, and FolderId.

URL Variable Example

This example will demonstrate the URL Variable Page Context option. It will retrieve a selected row from a report, and display the data on the dashboard. First, create a Page containing a Report Viewer and a Simple Tile components. On the Report Viewer, click 'Create' to enter the Report Designer.


 Click 'Add' under the 'Data Sources' column to Report over the following fields:

Account Data Source
Email addressCreated ByCreated On Date

On the 'Email Address' field, check the Send Data As Filter Change Source, and then declare a name in the text box. Remember this string value because it will be the URL variable used to retrieve data later in this example. 'Close' and 'Save' the Report to return to the Page Designer. 

In the Page Designer, click on 'Simple Tile' and then click 'Create' to build a tile Flow. 


In the Flow Designer, Open 'Settings' and change the 'Behavior Type' to 'Page Context Aware Flow Behaviour'

Page Context Aware Flow Behaviour
Make sure to set this configuration first. If this is not configured, the 'Get Page Variable' step will throw Errors. It is needed to allow the tile Flow to access page the user is currently viewing and any data contained within.

In this Flow, drag the 'Get Page Variable' step onto the Flow Canvas. Set the Page context option to URL variable and type in the previously declared filter change source data name into the variable text box. 


Then map the output of the Get Page Variable step into the Line 3 input of the Create Tile Data step.


In the Page Designer, change the behavior of the Simple Tile to 'Update on selection bus change' and declare the filter change source data name again. 


Finally, add the Page to a normal folder to create a Dashboard. Click on the Report rows to see the tile update with the corresponding email row value.

How To Create a Dashboard
For more information on creating a dashboard, refer to: "Creating Your First Page/Dashboard"


PageVariable Example

This example will utilize the PageVariable Page Context Option. This context option can be used in a similar fashion to the previous example to display a report that dynamically changes on a user selection. However, for the PageVariable a new use case will be used. For this example, adapt the previous page to have a new Simple Tile, and then create a new Flow for the tile.


Within the Designer, set the Flow to be page context aware, then drag the 'Get Page Variable' step on the canvas. After that, navigate in the steps tool box to Integration -> Internal Services -> Page Services ->  and drag the 'Set Page Parameter' onto the canvas.


Configure the 'Set Page Parameter' 'page Context Id' to be mapped to the Page Context Id variable, and select 'Build Data' for the 'parm' input. Declare "MyParameter" for the 'Name' field then map in any Flow data variable.

Use Case
The PageVariable option allows users to pass in data from the Flow into the tile. While the URL Variable option is mostly used for getting selection bust data from Decisions Reports.



On 'Get Page Variable', type in the configured value from the 'Set Page Variable' step's 'Name' input, into the 'Variable Name' input on the 'Get Page Variable' step. Then select the datatype of the expected data.


Finally, Save/Close the Flow, and in the Page Designer, Save/Close the Page. Then navigate to the dashboard folder. In the Tile Part to the right, the declared string value will be displayed.


Folder ID Example

Another Page Context setting that can be used is the FolderId option. This setting retrieves the FolderId of the page that it is tied to. A use case for this option would be creating a Custom Process View Page for either Case Entities, Flow Execution Extension, or Folder Extensions data structures. 

To set this up, add another column and row to the Page that was used in the previous two examples. The drag another 'Simple Tile' onto the canvas. 

 

Create another tile Flow.


Within this Flow, change the Behavior to 'Page Context Aware Flow Behaviour' and drag the 'Get Page Variable' step onto the canvas. Select the FolderId page context option. Map the 'PageData' output into one of the line inputs in the 'Create Tile Data' then Save/Close


Finally, navigate to the folder that displays the Page to see the FolderId appear on the newly created tile.



Was this article helpful?