EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB20129: How to dynamically modify the file name to include the personalization preference using Personalized Page Execution and Dynamic Subscription Sets in MicroStrategy Narrowcast Server


Community Admin

• Strategy


In MicroStrategy Narrowcast Server, Control Documents provide a way to personalize the name of files generated by services.

In Strategy Narrowcast Server 9.x - 10.x, Control Documents provide a way to personalize the name of files generated by services. The following is an example of the syntax necessary for file delivery, the name of the file can be specified with static text and/or Information Objects:
SaveDocumentAs='NAME_AS_DISPLAYED_IN_content_SECTION.pdf=NEW_NAME.pdf'
Note: While it is possible that Information Objects can be used in the personalization of filenames, they need to return the exact string that will be placed as part of the name generated. Carriage returns are not considered invalid characters when defining a filename.
 
The following steps outline the procedure to use so that an Information Object can be used in a Control Document to specify the document’s personalization preference as part of the file name. These steps are for documents running under Personalized Page Execution. Steps on how to use this with a Dynamic Subscription Set are included; however this technique can also be used just as easily with Static Subscription Sets.
Note: This technical note assumes that the attribute on which the page-by personalization will be based is already created in a Strategy Intelligence Server 8.x project.

  • In Strategy Developer, create a copy of the page-by attribute on which personalization will be based (i.e. slicing attribute). The copy should be an identical copy. No modification must be made to it.

ka04W000001MKwJQAW_0EM440000002BBn.jpeg
  • Create a Strategy Report that contains:
    • ​The original attribute on the page-by section
    • The copy of the attribute on the Report template.
    • A report filter defined as 'Attribute @ID = Copy of Attribute@ID'

ka04W000001MKwJQAW_0EM440000002BBf.jpeg
    • Note: If nothing is included on the report template it will come back with no data and by default will report the following: 'Error. Information object returned no data.'
  • In Strategy Narrowcast Administrator, create a content Information Object based on the previously created Strategy report. Specify 'Personalized Page Execution' as the Personalization Mode in the 'Advanced Options'.
ka04W000001MKwJQAW_0EM440000002BBi.jpeg
ka04W000001MKwJQAW_0EM440000002Hmh.jpeg
  • Setup the Information Source Module to support Dynamic Subscriptions if it is not already configured. The following settings are included for completeness to serve as a reference. For detailed steps refer to the following Strategy Knowledge Base technical note:

    KB19752 (KB6200-8X-2053): How to enable an Information Source to support dynamic subscriptions in Strategy Narrowcast Server 8.x
    • Attribute@ID used to define the Subscription ID, Address ID and User ID
ka04W000001MKwJQAW_0EM440000002BBq.jpeg
ka04W000001MKwJQAW_0EM440000002Hmm.jpeg
    • Under 'Preference', include the Attribute ID form
ka04W000001MKwJQAW_0EM440000002BBa.jpeg
  • Create a Subscription Information Object with the following options:
    • 'Retrieve dynamic subscription information from the information source and do not choose a filter' for how the information should be retrieved
    • Under the Preferences section, select the Attribute ID form for the content Information Object created in Step 3.
ka04W000001MKwJQAW_0EM440000002BBd.jpeg
  • Edit the new service and add a Control Document as follows:
    • In the contents section, click 'Define Execution Control (Advanced)' to create a new control document
    • Add the 'SaveDocumentAs' syntax and include the content Information Object created in step 3:
ka04W000001MKwJQAW_0EM440000002BBp.jpeg
    • SaveDocumentAs='NAME_AS_DISPLAYED_IN_content_SECTION.html=<content Information Object from Step 3> NEW NAME.html'
       
    • From the Control Document Editor, click on the View menu and select Document Element List.
    • Double-click on Document Element 1 (this should contain only one object and it should be the content Information Object). Change the stylesheet used to format the Information Object to the out-of-the-box 'MSTR8ToText-PageByInfoOnly' stylesheet. This is necessary in order to retrieve just the required information from the page-by.
ka04W000001MKwJQAW_0EM440000002BBk.jpeg
    • Click OK, and then select 'Return to Service Wizard'.
    • If a new Subscription Information Object was created in step 5 or no Dynamic Subscription Set already exists for the Subscription Information Object modified in step 5, create a new Dynamic Subscription Set. Select the Subscription Information Object from step 5.

 
When the service is executed the files created will be named using the attribute element information returned by the Information Object. A file will be created for each attribute element available.

ka04W000001MKwJQAW_0EM440000002BBY.jpeg

Note: The report created in this technical note was designed with simplicity in mind. While it is possible that the content report being delivered can be used, these reports are often much larger and could impact performance. Strategy Technical Support will not state what the 'best method', 'recommended method', or 'best practice' is for this; the choice is left up to the implementer.
 
Refer to the following Strategy Knowledge Base technical notes and documents for more information:

  • KB9618 (KB6200-7XX-0693 ): What is the control document syntax for changing the names of files that are saved using the Save to File ITM in Strategy Narrowcast Server?
  • KB11180 (KB6200-75x-1188 ): How to rename SMTP attachments using a control document in Strategy Narrowcast Server 7.5.x
  • KB10150 (KB6200-75x-1015 ): How to use Control Documents to modify the file name in a service with Strategy Narrowcast Server 7.5.x using the File ITM
  • KB14281 (KB6200-80X-1504 ): How to use dynamic content from a grid report in a Control Document in Strategy Narrowcast Server 8.0.x

Comment

0 comments

Details

Knowledge Article

Published:

April 3, 2017

Last Updated:

April 3, 2017