- 27 Nov 2024
- 5 Minutes to read
- Print
- DarkLight
Get Page Variable
- Updated on 27 Nov 2024
- 5 Minutes to read
- Print
- DarkLight
Overview
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 | |
PageVariable | Gets data from a Report or Form on the Page through a selection bus. |
FolderId | Gets data from the FolderId of the Page that the user is navigated to. |
URL Variable | Gets data from a variable within the URL. |
CookieValue | Gets data from browser cookies. |
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.
- From a Designer Project, select CREATE REPORT from the top Action bar and create a Page.
- From the Page Designer, drag a Report Viewer component from the Toolbox tab into the Page's workspace.
- Add a Simple Tile component from the TILES category in the Toolbox.
- Select the Report Viewer to navigate to its Properties tab.
- Under REPORT SETUP, click the PICK DEFAULT REPORT button. Click CREATE, then Base Report. Name the Report, then click CREATE.
- Click the Add button under Data Sources. Under the resulting Folder tree, expand the Common category select Account Data Source.
- Under Data Fields Add Email Address, Created By, and Created On Date.
- Select click Email Address under Data Fields to navigate to its Properties tab.
- 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.
Save, then close the Report Designer via X.
From the Page Designer, click the Simple Tile, and then click the PICK FLOW button in the Properties tab.
Click CREATE, then Tile Source Flow, provide a Name, then CREATE once more.
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 BehaviourMake 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.Add a Get Page Variable step from the DASHBOARDS category of the Toolbox, in front of Create Tile Data step.
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.Connect the Done path of the Get Page Variable step to the Create Tile Data step.
Navigate to the Create Tile Data's Properties tab. Select From Flow map Page Data to Line 3 under TILE SETUP.
Navigate to the End step Properties tab and map TIleData to the TILE DATA INPUTS.
Save and close the Flow.
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.
Declare the previously defined Filter Change Source Data Name.
Save and close the Page.
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.
- Adapt the previous Page to have a new Simple Tile, and then create a new Flow for that Tile.
- From the Flow, navigate to the Properties tab. Under SETTINGS, set the Behavior Type to Page Context Aware Flow Behavior.
- Add a Get Page Variable step from the DASHBOARDS category of the Toolbox, in front of Create Tile Data step.
- In front of the Get Page Variable step, add a Set Page Parameter step from INTEGRATION > INTERNAL SERVICES > PAGESERVICE.
- 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. Select the Get Page Variable step; under Page Context, input the declared value from the Set Page Variable step in the Variable Name box.
Select String [Text] from the Expected Type dropdown menu.
Connect the Done path of the Get Page Variable step to the Create Tile Data.
Select the Create Tile Data step and map PageData to one of the Line inputs under TILE DATA.
Select the End step and map TileData to its respective Input.
Save and close the Flow, then the Page.
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.
- Add another column or row to the Page that was used in the previous two examples.
- Drag an additional Simple Tile into the newly established cell in the canvas.
- Under COMMON PROPERTIES for the Simple Tile, CREATE the Tile Flow.
- Under the Properties tab for the Flow, change the Behavior to Page Context Aware Flow Behaviour via the dropdown menu.
- Add a Get Page Variable step from the DASHBOARDS category of the Toolbox, in front of Create Tile Data step.
- Select the Get Page Variable step and select FolderId via the Data Type dropdown under Page Context.
- Connect the Done path of the Get Page Variable step to the Create Tile Data step.
- Select the Create Tile Data step and map PageData to one of the Line inputs under TILE SETUP.
- Select the End step and map TileData to the Tile Data Input.
- Save and close the Flow.
- Save and close the Page.
- Navigate to the Folder associated with the Page to view the Tile that displaying the mapped FolderId.