KB8240: How to generate a .ZIP attachment with specific filenames in MicroStrategy Narrowcast Server 9.x
Execute the following steps to create a service that sends a .ZIP attachment:
Create a new Service using the Service Wizard as shown below:
Proceed by defining the service. In the Message contents section of the Service Wizard, define the attachment. For the option to insert an existing document, right click on Define Attachments. Note that one or many attachments may be defined, but only one .ZIP file will be generated to include all selected attachments.
Once the attachments have been defined, click on the compression properties icon as shown below:
Under the 'Section' dropdown menu, select 'Attachments' and click OK as shown below. The default name given to the .ZIP file will be 'Attachments.zip'. A password may be defined for the .ZIP file in this step as well.
By default, the 'Section' name, such as 'Attachments', is the file name. To specify a different file name for the .ZIP file, enter the appropriate name in the File Name box. Enter a static name or specify one of the following macros to generate a dynamic name: %%SERVICE NAME%% %%SERVICE EXECUTION ID%% %%SERVICE EXECUTION TIMESTAMP%% These macros, which are case sensitive, are used to insert the service name, service execution ID, or the service execution time stamp at service run time, allowing for dynamic data to be used in the file name. Following is an example where a .ZIP file will be generated with a name containing the service name and the service execution time.:
%%SERVICE NAME%% %%SERVICE EXECUTION TIMESTAMP%% .zip NOTE: Two spaces are required between %% SERVICE NAME %% and %%SERVICE EXECUTION TIMESTAMP%%.zip
Proceed through the service wizard to define the rest of the service. Below is a screenshot of the attachment that will be generated from the example: