Difference between revisions of "Template:MDBTutorialViewPropertiesAndContext"

From Mea Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Defining View Properties and Context ==
+
== Defining View Properties and Variables ==
# Creating a new QPR UI view starts by defining the Name and View [[Context]]. These are defined in the view properties that is opened by clicking the '''Properties''' button:<br>[[File:OpenViewProperties.png|800px]]
+
To define context variables, type in the name of the variable to the text field and click the check mark. After that, you can click the value field and type in the value for your context variable. Context variables starting with "'''sys:'''" are system variables which have special purpose in QPR UI - use them only for their intended purpose. The '''Behavior''' selection affects the context variable used explained in [[Context_Variables_in_QPR_UI#Context Variable Behaviors|Context Variable Behaviors]]. To see what context variable values are used in the view, panel, or presentation object, select the '''Show effective context''' check box in the Context tab of the view, panel, or presentation object properties pages.
# First, give your view a '''Name''' and a '''Description'''. Then, click '''Presentation''':<br>[[File:ViewProperties.png|800px]]
 
# On the Presentation tab, change the '''Background color'''. Set also the '''Outer margin''' to be "5", this setting will make the panels be closer to each other than with the default setting. After that, click '''Context''':<br>[[File:ViewPresentationTab.png|800px]]
 
# The context defines the starting points for later querying data from QPR EnterpriseArchitect/ProcessDesigner, QPR Metrics, and/or QPR ProcessAnalyzer. Define the context by selecting values for the context variables by first selecting a variable from the drop-down menu and then tapping the edit icon on the Value column:<br>[[File:ViewContext.png|800px]]<br>
 
# To define context variables, type in the name of the variable to the text field and click the check mark. After that, you can click the value field and type in the value for your context variable. Context variables starting with "'''sys:'''" are [[QPR UI System Variables|system context variables]] which have special purpose in QPR UI - use them only for their intended purpose. The '''Behavior''' selection affects the context variable used explained in [[Context_Variables_in_QPR_UI#Context Variable Behaviors|Context Variable Behaviors]]. To see what context variable values are used in the view, panel, or presentation object, select the '''Show effective context''' check box in the Context tab of the view, panel, or presentation object properties pages.
 
=== Using QPR EnterpriseArchitect/ProcessDesigner Data ===
 
[[File:EAContext.png|800px]]
 
* To use QPR EnterpriseArchitect or QPR ProcessDesigner data, define the '''sys:eapdModel''', '''sys:eapdElementType''' and '''sys:eapdElement''' context variables to set the default context instance. With the '''sys:eapdElement''' context variable, you can use the check boxes on the left side of the list to select the elements to which the view you are designing applies. These elements will then be selectable as the context instance via the '''Selections''' button when browsing the view. Selecting the '''All elements automatically''' check box will result in all elements of the element type defined by the '''sys:eapdElementType''' variable to be automatically available in the view when new elements of that type are added to the model.
 
  
=== Using QPR Metrics Data ===
+
== Variables Usage Example ==
[[File:MetricsContext.png|800px]]
+
There is a view with one panel, in which there is one presentation object. The '''Session''' variable values are defined as follows:<br>
* If you want to show data from element(s) that reside in some particular scorecard(s), define the '''sys:metricsModel''' and '''sys:metricsScorecard''' context variables. This is the most commonly preferred way of showing Metrics data.
+
{| class="wikitable"
* If you want to show data from a single Metrics element or measure, define the '''sys:metricsModel''', '''sys:metricsValueSettings''', and '''sys:metricsElement''' context variables.<br><br>The difference between these two approaches is that views with the '''sys:metricsScorecard''' variable defined can show data from multiple measures residing in the selected scorecards, whereas views with the '''sys:metricsElement''' variable defined are restricted to the measures selected here, but they enable browsing different measures using the same value settings as the selected measure.
+
!'''Variable name'''
** With the '''sys:metricsScorecard''' and '''sys:metricsElement''' variables, you can use the check boxes on the left side of the list to select the scorecards or elements to which the view you are designing applies. These scorecards or elements will then be selectable as the context instance via the '''Selections''' button when browsing the view. Selecting the '''All scorecards/elements''' automatically check box will result in all scorecards or elements of the model defined by the sys:metricsModel variable to be automatically available in the view when new scorecards or elements of the defined sys:metricsValueSettings type are added to the model.
+
! '''Value'''
=== Using QPR ProcessAnalyzer Data ===
+
|-
[[File:PAContext.png|800px]]
+
||AccountManager
# If you want to show QPR ProcessAnalyzer data, define the desired context variables and their values into the text fields. Some suggested variables to use: '''FilterId''', '''ModelId''', '''AnalysisType''', '''MaximumCount''', '''SelectedActivities''', and '''SelectedTransitions'''. See the [[QPR ProcessAnalyzer Analysis Parameters|Analysis Parameters]] page for a more complete listing of possible variables.
+
||John Smith
After defining the view properties and context, click the '''Close''' button to apply the changes and exit the view properties.<br>[[File:ViewPropertiesClose.png|800px]]
+
|-
 +
||Country
 +
||Sweden
 +
|}
  
=== Select Period ===
+
In the '''View Properties''', the following variable values are defined:<br>
By default, the QPR UI view shows data from the Current period. As the view you are designing might not have data available for the current period, click the '''Selections''' button:
+
{| class="wikitable"
 +
!'''Variable name'''
 +
! '''Value'''
 +
! '''Behavior'''
 +
|-
 +
||AccountManager
 +
||William Taylor
 +
||Stored variable
 +
|-
 +
||CustomerGroup
 +
||Kids
 +
||Local variable
 +
|}
 +
 
 +
In the '''Panel Properties''', the following variable values are defined:<br>
 +
{| class="wikitable"
 +
!'''Variable name'''
 +
! '''Value'''
 +
! '''Behavior'''
 +
|-
 +
||AccountManager
 +
||Susan Chapman
 +
||Local variable
 +
|-
 +
||Country
 +
||Finland
 +
||Local variable
 +
|}
 +
 
 +
In the '''Presentation Object Properties''', the following variable values are defined:<br>
 +
{| class="wikitable"
 +
!'''Variable name'''
 +
! '''Value'''
 +
! '''Behavior'''
 +
|-
 +
||ProductGroup
 +
||Umbrellas
 +
||Stored variable
 +
|}
 +
 
 +
In the '''Effective View Context''', these result into the values shown below. Note the '''Source''' column displaying the information where the effective context comes from:<br>
 +
{| class="wikitable"
 +
!'''Variable name'''
 +
! '''Value'''
 +
! '''Source'''
 +
! '''Scope'''
 +
|-
 +
||AccountManager
 +
||William Taylor
 +
||Scope of the view
 +
||View
 +
|-
 +
||Country
 +
||Sweden
 +
||Inherited from session context
 +
||Session
 +
|-
 +
||CustomerGroup
 +
||Kids
 +
||Scope of the view
 +
||View
 +
|}
 +
 
 +
In the '''Effective Panel Context''', these result into the values shown below. Note the '''Source''' column displaying the information where the effective context comes from:<br>
 +
{| class="wikitable"
 +
!'''Variable name'''
 +
! '''Value'''
 +
! '''Source'''
 +
! '''Scope'''
 +
|-
 +
||AccountManager
 +
||Susan Chapman
 +
||Initialized from the panel's context
 +
||Panel
 +
|-
 +
||Country
 +
||Finland
 +
||Initialized from the panel's context
 +
||Panel
 +
|-
 +
||CustomerGroup
 +
||Kids
 +
||Inherited from the effective context of the view
 +
||View
 +
|}
 +
 
 +
In the '''Effective Presentation Object Context''', these result into the values shown below. Note the '''Source''' column displaying the information where the effective context comes from:
 +
{| class="wikitable"
 +
!'''Variable name'''
 +
! '''Value'''
 +
! '''Source'''
 +
! '''Scope'''
 +
|-
 +
||AccountManager
 +
||Susan Chapman
 +
||Inherited from the effective context of the panel
 +
||Panel
 +
|-
 +
||Country
 +
||Finland
 +
||Inherited from the effective context of the panel
 +
||Panel
 +
|-
 +
||ProductGroup
 +
||Umbrellas
 +
||Scope of the presentation object
 +
||Presentation object
 +
|-
 +
||CustomerGroup
 +
||Kids
 +
||Inherited from the effective context of the view
 +
||View
 +
|}
 +
 
 +
To put it more concisely, the context variable values (and their behaviors) are as follows:<br>
 +
{| class="wikitable"
 +
!Context Variable||Session||View||Panel||Presentation Object
 +
|-
 +
|AccountManager||John Smith||William Taylor (Stored variable)||Susan Chapman (Local variable)||
 +
|-
 +
|Country||Sweden|| ||Finland (Local variable) ||
 +
|-
 +
|ProductGroup|| || || ||Umbrellas (Stored variable)
 +
|-
 +
|CustomerGroup|| ||Kids (Local variable)|| ||
 +
|}
 +
 
 +
The effective context values are:
 
<br>
 
<br>
: [[File:Selections.png|800px]]
+
{| class="wikitable"
 
+
!Context Variable||Session||View||Panel||Presentation Object
Then, select a period for which you have data:<br>
+
|-
: [[File:SelectPeriod.png|800px]]
+
|AccountManager||John Smith||William Taylor||Susan Chapman||Susan Chapman
 +
|-
 +
|Country||Sweden||Sweden||Finland||Finland
 +
|-
 +
|ProductGroup|| || || ||Umbrellas
 +
|-
 +
|CustomerGroup|| ||Kids||Kids||Kids
 +
|}

Latest revision as of 10:29, 23 December 2019

Defining View Properties and Variables

To define context variables, type in the name of the variable to the text field and click the check mark. After that, you can click the value field and type in the value for your context variable. Context variables starting with "sys:" are system variables which have special purpose in QPR UI - use them only for their intended purpose. The Behavior selection affects the context variable used explained in Context Variable Behaviors. To see what context variable values are used in the view, panel, or presentation object, select the Show effective context check box in the Context tab of the view, panel, or presentation object properties pages.

Variables Usage Example

There is a view with one panel, in which there is one presentation object. The Session variable values are defined as follows:

Variable name Value
AccountManager John Smith
Country Sweden

In the View Properties, the following variable values are defined:

Variable name Value Behavior
AccountManager William Taylor Stored variable
CustomerGroup Kids Local variable

In the Panel Properties, the following variable values are defined:

Variable name Value Behavior
AccountManager Susan Chapman Local variable
Country Finland Local variable

In the Presentation Object Properties, the following variable values are defined:

Variable name Value Behavior
ProductGroup Umbrellas Stored variable

In the Effective View Context, these result into the values shown below. Note the Source column displaying the information where the effective context comes from:

Variable name Value Source Scope
AccountManager William Taylor Scope of the view View
Country Sweden Inherited from session context Session
CustomerGroup Kids Scope of the view View

In the Effective Panel Context, these result into the values shown below. Note the Source column displaying the information where the effective context comes from:

Variable name Value Source Scope
AccountManager Susan Chapman Initialized from the panel's context Panel
Country Finland Initialized from the panel's context Panel
CustomerGroup Kids Inherited from the effective context of the view View

In the Effective Presentation Object Context, these result into the values shown below. Note the Source column displaying the information where the effective context comes from:

Variable name Value Source Scope
AccountManager Susan Chapman Inherited from the effective context of the panel Panel
Country Finland Inherited from the effective context of the panel Panel
ProductGroup Umbrellas Scope of the presentation object Presentation object
CustomerGroup Kids Inherited from the effective context of the view View

To put it more concisely, the context variable values (and their behaviors) are as follows:

Context Variable Session View Panel Presentation Object
AccountManager John Smith William Taylor (Stored variable) Susan Chapman (Local variable)
Country Sweden Finland (Local variable)
ProductGroup Umbrellas (Stored variable)
CustomerGroup Kids (Local variable)

The effective context values are:

Context Variable Session View Panel Presentation Object
AccountManager John Smith William Taylor Susan Chapman Susan Chapman
Country Sweden Sweden Finland Finland
ProductGroup Umbrellas
CustomerGroup Kids Kids Kids