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 Share.

3.   In the Share 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 ID

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 considered by 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.

The specified values for each parameter in the URL will either be included or excluded from view results based on how that parameter’s Filter Mode is configured in Viewer. If a parameter has a mode of “Include”, the values passed along to the view by the URL will be returned as part of view results. If a parameter has a mode of “Exclude”, the values passed along the view by the URL will not be part of view results – all member values except the ones specified by the URL will be a part of view results.

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

Two pieces of syntax are used in combination with each other to control whether all, some, or none of the toolbar shows above a view. They are IsHideToolbar and IsHideToobarIcon. Examples follow.

To hide all parts of the toolbar, use the syntax &IsHideToolbar=true&IsHideToobarIcon=true in your URL.

To show all parts of the toolbar, leave the syntax at its default of &IsHideToolbar=false&IsHideToobarIcon=false in your URL or exclude that syntax from the URL all together.

To hide the paging icons and show just the main icons in the toolbar, use the syntax &IsHideToolbar=true&IsHideToobarIcon=false in your URL.

To show just the paging icons and hide all other icons in the toolbar, use the syntax &IsHideToolbar=false&IsHideToobarIcon=true in your URL.

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

Logo displayed above a view’s grid, to right of the view name

To hide it, use IsHideViewImage=True

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

Note: A logo that applies to all views can be defined in the Views section of the Application window by administrators. The logo is an image meant to show up above a view grid, to the right of a view’s name. Setting the IsHideViewImage to False won’t have any impact on views run from a URL unless a logo has also been defined in the Application window.

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 let the display of view explorer be controlled by the “User Options” of the person running the URL, leave IsHideExplorer blank or exclude it from the URL. It’s blank by default in URL’s copied from the View URL window that’s accessed from the left panel.

IsHideViewExplorer=

Set the item to True or False for this syntax to control the display of view explorer. The URL will ignore the view explorer “User Options” setting of the person running the URL.

To hide it, use IsHideExplorer=True

To display it, use IsHideExplorer=False

Navigation Panel

To let the display of the navigation panel be controlled by the “User Options” of the person running the URL, leave IsHideNavigationPanel blank or exclude it from the URL. It’s blank by default in URL’s copied from the View URL window that’s accessed from the left panel.

IsHideNavigationPanel=

Set the item to True or False if you want the URL to control the display of the navigation panel. The URL will ignore the navigation panel “User Options” setting of the person running the URL.

To hide it, use IsHideNavigationPanel=True

To display it, use IsHideNavigationPanel=False

Location of Information Used in URL's

View ID and Parameter Names

Any URL copied from the Share 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 include the “Default.aspx” syntax, which means they will display the top frame and left panel of Stratum.Viewer. That part of the interface has simply been cropped from the example images. If you didn’t want the top frame and left panel to display, you’d use “ViewWindow.aspx” in the URL rather than ‘Default.aspx”.

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