QuestionHow can I create a right-click Item Task that will open a report and pass the selected resource's attributes as parameters?
Answer
In this example, we'll show how to configure an Item Task's Substitution Parameters in a URL action.
This Item Task will be used to open the Software Compliance Status report and pass the selected computer's name as a parameter to the report.
To begin creating the task:
- In the Symantec Management Console menu go to Settings, All Settings.
- Expand the Notification Server folder and the Right Click Menu subfolder
- Right-click on the User Defined folder and select New, Right-Click Action
- At the top of the right-hand pane, give your new Item Task a name such as Software Compliance Status
- At the Resource Type dropdown box select Computer
- At the Action Type dropdown box select URL
- Paste the following into the Base URL box (For steps to find the Report's Item GUID, see steps 1a-1c in KB45198):
- http://localhost/altiris/reporting/report.aspx?ItemGuid=6627546d-e98a-4fea-a1c2-741abcc2b832&Parameters=
- At the Open dropdown box select New window (See KB45288)
- Click the Add button in the toolbar of the Substitution Parameters table
- When the Select Attributes dialog opens, click the Group dropdown and select Resource Item
- Hightlight the Name row in the Available Items table, click the right arrow, >, to add the Name field to the Selected Items table and click OK
- Highlight the Resource Name row in the Substitution Parameters table and click the Edit pencil
- When the Edit Attribute dialog opens, change the parameter name to Computer Name and click OK (For more information on using report parameters, see KB45198)
- Append the following to the end of the text that you pasted into the Base URL field in step 7a:
- Computer Name:[%Computer Name%]
- The full Base URL should now read:
- http://localhost/altiris/reporting/report.aspx?ItemGuid=6627546d-e98a-4fea-a1c2-741abcc2b832&Parameters=Computer Name:[%Computer Name%]
- Click the Save Changes button
- Click the Manage menu and select Computers
- Right-click on any computer and select User Defined, Software Compliance Status
- The Software Compliance Status report will open and the Computer Name field will be populated with the name of the computer you had selected
The XML for this Item Task is also attached to this article. You can download the attachment from the right-hand pane and import it into the User Defined folder (see steps 1-3 to locate this folder) by right-clicking the folder and selecting Import.