Passing Parameters into Views via URL's

Stratum.Viewer supports passing parameters to existing views through URL access. This provides integration between other applications and Stratum.Viewer views. The types of parameters that can be used with this functionality are Select Members, Drop Down, User List, and Expression (except for named sets) parameters. For example, the following URL passes two values for a Select Members parameter named RepBrokerMembers that exists for the RepBroker level.

http://server-xyz:60500/Default.aspx?ViewID=472&vp:RepBrokerMembers=306;305

The syntax of the URL must contain the location of the Stratum.Viewer application, the view ID, the name of the parameter, and the values to be passed in a format supporting the specified parameter type. For user list parameters, you also need the user list ID. Optionally, you can include syntax in the URL that will control the display of the grid toolbar, name of the view and image above the grid, View Filter section, and view explorer.

Starting Point

When you begin setting up a URL for passing parameters, we recommend using the existing functionality in Viewer for copying view URL’s as your starting point. The view you plan to use needs to have parameter groups and parameters defined as part of its view definition.

1.   Navigate to the view in the left panel.

2.   Right-click the view name, and select URL.

3.   In the View URL window, copy the highlighted URL that displays in the window.

4.   Customize the URL.

The table that follows explains the syntax of parts of a view URL. Examples showing different types of parameter values passed into views via URL's follow.

Syntax for URL's

This table shows the format to use when setting up different parts of the URL.

Item

Format & Values

Location of Stratum.Viewer and display of top frame and left panel

To run the view without the Stratum.Viewer top frame and left panel:

http://server-xyz:#####/ViewWindow.aspx where server-xyz is the name of the Stratum.Viewer server and ##### is its port number.

To run the view with the Stratum.Viewer top frame and left panel displayed:

http://server-xyz:#####/Default.aspx where server-xyz is the name of the Stratum.Viewer server and ##### is its port number.

View name

ViewID=# where # is the ID assigned to the view by Stratum.Viewer

Parameter name

Name= where name is the parameter name and the value(s) of the parameter follow the equal sign

Parameter values

; - use a semi-colon to separate multiple values specified for a single Select Members parameter.

If you want all members returned for a Drop Down or Select Members parameter, then you need to specify “All <name of the hierarchy associated with the parameter>” as the parameter value.

Separators between items

? - use a question mark to separate the location of Stratum.Viewer from the View ID

&vp: - use that string of text to separate the View ID and parameter name (note the colon used after the &vp text). Also used to separate multiple parameter types if more than one type is passed via the URL.

; - use a semi-colon to separate multiple values specified for a single Select Members parameter.

& - use an ampersand to separate additional items in the URL from the parameters, such as syntax for hiding the grid toolbar, View Filter section, or view explorer.

Grid toolbar

To hide it, use IsHideToolbar=True

To display it, either exclude this syntax from the URL all together or use IsHideToolbar=False

View name above grid

To hide it, use IsHideViewName=True

To display it, either exclude this syntax from the URL all together or use IsHideViewName=False

View image above grid

To hide it, use IsHideViewImage=True

To display it, either exclude this syntax from the URL all together or use IsHideViewImage=False

View Filter section

To hide it, use IsHideViewFilter=True

To display it, either exclude this syntax from the URL all together or use IsHideViewFilter=False

View explorer

To hide it, use IsHideExplorer=True

To display it, either exclude this syntax from the URL all together or use IsHideExplorer=False

Location of Information Used in URL's

View ID and Parameter Names

Any URL copied from the View URL window contains the view ID and names of parameters for the view. The ID’s for views also can be looked up in their properties window. An example is shown below. The View list window also displays the ID’s for each view.

The name of a parameter can be looked up in view explorer. Right-click the associated view name in the left panel and select Edit. Expand the parameter group for the parameter to see the parameter name. The name also shows in its Properties window, accessed by double-clicking the parameter.

User List ID

The user list ID shows in the bottom of your browser window when you open a list from the User List window as the list loads in the User List Maintenance window. The ID displays in the same area when you are viewing the list from the User List Maintenance window and hover the mouse cursor over any buttons in the toolbar except for the Help button -- for example, when the mouse cursor is over the New button .

Examples

Select Members Parameter That Passes Specific Values

This URL runs a view with ID 931. It returns four members for a Select Members parameter named MembersParameter that exists on the Product Family level.

http://server-xyz:60500/Default.aspx?ViewId=931&vp:MembersParameter=60;61;62;64

Note: The previous URL and URL's in the remaining examples will display the top frame and left panel of Stratum.Viewer. That part of the interface has simply been cropped from the example images.

Select Members Parameter That Passes All Values

This URL runs a view with ID 931. It returns all members for a Select Members parameter named MembersParameter that exists on the Product Family level. Notice there is no filter icon next to the Product Family level since the URL told the view to return all values for that level.

http://server-xyz:60500/Default.aspx?ViewId=931&vp:MembersParameter=All Product Family

Drop Down and User List Parameters

This URL runs a view with ID 932. It returns a member for a Drop Down parameter named DropDownRepParameter that exists on the RepBroker level. The URL also returns members for a User List parameter named UserListShipToParameter that exists on the Ship-To Market level. The specified list has an ID of 104.

http://server-xyz:60500/Default.aspx?ViewId=932&vp:DropDownRepParameter=300&vp:UserListShipToParameter=104

Expression Parameter

This URL runs a view with ID 933. It returns the values of an evaluated expression related to an Expression parameter named ExpProdParameter that exists on the Product level. The expression passed into the view by the parameter returns members of the level with a Prod ABC Classification attribute relationship of B.

After the parameter information, we included the text IsHideViewFilter=True in order to hide the View Filter section.

http://server-xyz:60500/Default.aspx?ViewId=933&vp:ExpProdParameter=[Product].[Product].CurrentMember.Properties("Prod ABC Classification") = "B"&IsHideViewFilter=True