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

KB484317: How to pass a store location from one dossier to another to have the target display all stores within X km radius dynamically


Min Zheng

Senior Manager, Cloud Support • MicroStrategy


This article shows you how to pass a store location from one dossier to another to have the target display all stores within X km radius dynamically

Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.
Consider the following scenario: 
A source dossier displays a list of all stores. When you click on a store from the list, you want to be directed to a target dossier, which displays all stores within X km radius from the selected store.
This article will demonstrate how to achieve the described scenario using the Store attribute in the Tutorial project. You can assume X km is equivalent to 3 km. 

  • The Store attribute has a latitude form based on column STORE_ LONGITUDE and a longitude form based on column STORE_LONGITUDE in the warehouse.
  • You should prepare a similar attribute in the project. 

The following are the 3 main steps required: 

  1. Add an HTML tag form to the Store attribute so that it is displayed as Store Name but contains a link to the target dossier. The GUID for the target dossier is required for this step.
  2. Create a source dossier to choose a store.
  3. Create a target dossier , which will show all stores within a 3 km radius around the store selected in the source dossier. Its GUID is used in step 1.

1. Add an HTML tag form to Store attribute so that it displays as Store name but contains a link to target dossier.


For Store attribute, add an attribute form with type “HTML tag” and the following expression:


ApplySimple("'<A HREF=Main.aspx?evt=2048001&documentID=EFA90D934B888A77300038A7F944873E&valuePromptAnswers=' || #0 ||'^'|| #1 & ' target=_blank >' || #2|| '</A>'", [STORE_LATITUDE], [STORE_LONGITUDE], [STORE_NAME])

ka0PW0000001JcYYAU_0EM2R000000fqqJ.jpeg


Note:

  • This sample is for a dossier using ASP Web and Oracle Database. The expression may need to be adjusted if you are using a different configuration.
  • If the linked target is a document instead of dossier, use the following sample expression:
    
    ApplySimple("'<A HREF=Main.aspx?evt=2048001&documentID=EFA90D934B888A77300038A7F944873E&valuePromptAnswers=' || #0 ||'^'|| #1 || ' target=_blank >' || #2|| '</A>'", [STORE_LATITUDE], [STORE_LONGITUDE], [STORE_NAME])

  • Please replace the parameter documentID with the GUID for your own target dossier/document.

2. Create a source dossier to choose a store


Create a dataset with the above Store attribute and create a source dossier with this dataset.
The report should resemble the following in Developer. See how the html tag form has been constructed.

ka0PW0000001JcYYAU_0EM2R000000fqqO.jpeg


The report should resemble the following in Web. See how the html tag is displayed as the Name form with a link.

ka0PW0000001JcYYAU_0EM2R000000fqqT.jpeg

3. Create a target dossier, which will show all stores within a 3 km radius of the selected store in the source dossier

  • Create 2 numeric value prompts, one for Latitude and the other for Longitude.
ka0PW0000001JcYYAU_0EM2R000000fqqY.jpeg
  • Create 2 filters with Advanced qualification – Custom Expression for Latitude and Longitude respectively using below expressions where above 2 value prompts are used:
ka0PW0000001JcYYAU_0EM2R000000fqod.jpeg
  • If "Advanced qualification" is not available in the Filter editor, please see KB18109.
    Latitude filter expression:
    
    ApplyComparison("#0 between (#1 - #2*0.0090133729745762) and (#1 + #2*0.0090133729745762)",Store@latitude,? LatitudePrompt,3)

    Longitude filter expression:
    
    ApplyComparison("#0 between (#1 - #2*0.0090133729745762) and (#1 + #2*0.0090133729745762)",Store@longitude,? LongitudePrompt,3)

ka0PW0000001JcYYAU_0EM2R000000fqqi.jpeg
  • Create a dataset with Store attribute and the 2 filters and add this dataset to the Target dossier.
ka0PW0000001JcYYAU_0EM2R000000fqqs.jpeg
  • Note: The filter order matters. It should be same as how the order for valueprompt parameter in the HTML tag expression is constructed, either both Latitude first or both Longitude first.
    Final Stage: Format both dossiers, e.g configure both grids to Map widget. The effect: Source Dossier
ka0PW0000001JcYYAU_0EM2R000000fqr7.jpeg
  • Click on The Spring Group in the tooltip and it will open the target dossier as shown below:
ka0PW0000001JcYYAU_0EM2R000000fqrC.jpeg

Dynamic Distance


If a dynamic distance (3 km is used in this KB sample) is desired, a numeric value prompt can be created and used, instead of hardcoding 3 km in the filter expression.


Comment

0 comments

Details

Knowledge Article

Published:

June 5, 2020

Last Updated:

March 21, 2024