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

Dynamic text "{&USER}" limitations which occurs when document cache is enabled.


Yuying He

Software Engineer • MicroStrategy


This article outlines a limitation about dynamic text "{&USER}" which occurs when document cache is enabled and workarounds.

Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.

Symptom


When designing a dossier/document, we can put "{&USER}" to text field to get name of current login user.  For example, if we type in below text:

ka0PW0000001JkaYAE_0EM4W0000070c4k.jpeg

after running the dossier, it will show resolved current user and time.

ka0PW0000001JkaYAE_0EM4W0000070c4p.jpeg

But if we enable cache for this dossier or document and disable "cache per user", this function might be broken. Sometimes cache can be hit, in such case, the text field will always show the user name stored in the cache, instead of current user. The reason is because user information is not used to identify cache. 
 

Action

There are two workarounds to solve this problem.
 

Workaround 1 - Enable the "cache per user" setting on the I-Server

The setting is now supported in both developer and workstation. It’s project level setting, right click on project name, the properties window will be opened. 
There are two drawbacks:

  1. There may be very large number of caches generated.
  2. The caches in this project cannot be shared among users.

The setting in Developer:

ka0PW0000001JkaYAE_0EM4W0000070c4z.jpeg

The setting in Workstation:

ka0PW0000001JkaYAE_0EM4W0000070c54.jpeg

 

Workaround 2 - Use system prompt [User Login]

  1. Create metric with formula Max(?[User Login]){~}, name it as "user login".
  2. In dossier datasets panel, click "Existing objects", add the newly created metric and any attribute like year as a new dataset.
  3. Drag the metric to text field.

This workaround will only generate cache per user for the dossier/document that uses this workaround.
 


Comment

0 comments

Details

Knowledge Article

Published:

March 24, 2023

Last Updated:

March 21, 2024