Using the location of an iPhone or iPad to filter data: Geo Location prompt

You can use Geo Location prompts to filter data in a report, document, or Map widget by using the iPhone or iPad's current geographical location. For example, a Map widget displays several locations as markers on the map display. You can choose to display only those location markers that are in the same state, city, or zip code as the iPhone or iPad's current location.

You can:

The location name that is returned by a Geo Location prompt is based on Google’s geocoding. The prompt determines your longitude and latitude using your iPhone or iPad’s GPS receiver, and passes this information to Google Maps to return information about your location.

To use an Attribute Element prompt to filter attribute elements based on the location of the iPhone or iPad, you must provide a location mapping attribute that maps Google's geocoded location information to the data you want to filter. For example, if you want to filter a list of stores by the state in which the iPhone or iPad is located, you can provide a location mapping attribute that contains separate attribute forms for state location information as returned by Google, and information (such as the store name and store address) for each store. The location mapping attribute must store location information in the same format that Google uses to provide the location of the user.

The attribute that provides the list of attribute elements that are filtered and displayed by the Geo Location prompt, also called the display attribute, does not have to be the same as the location mapping attribute. For example, the Customer State is both the display attribute and the location mapping attribute. When the prompt is displayed on an iPhone or iPad, the list of prompt answers is filtered to display the current state, as shown in the image below on the left. Instead, if the display attribute is the Store attribute, and the location mapping attribute is Customer State, the list of prompt answers is filtered to display the stores in the current state, as shown in the image below on the right. Users can select stores from the list for which to display data.

Example of an Attribute Element prompt displaying the current state Example of an Attribute Element prompt displaying a list of stores

For general information about prompts, see About prompts. For more information on iPhone and iPad prompts, including the Geo Location prompt, see Creating iPhone and iPad prompts.

The procedures below list steps to create a Value prompt and an Attribute Element prompt that use the iPhone or iPad's geographical location. If you create a Value prompt, you will create a total of two Value prompts, one to provide latitude and one to provide longitude.

To create a Value prompt that uses the iPhone or iPad's geographical location

Prerequisites

  1. From any folder page, click the Create Prompt Create Prompt icon icon on the MicroStrategy Web home page, then click Value Prompt.

  2. On the Definition tab, select the Numeric prompt option.

  3. On the General tab, specify a title for the prompt in the Title field. The title is displayed along with the prompt when the prompt is run.

  4. To require users to answer the prompt before running the report, select the Prompt answer is required check box.

  5. To set the maximum and minimum values that can be entered by the user, select the Minimum value and Maximum value check boxes and type a value in the respective fields. You can specify a minimum value even if you do not specify a maximum value.

  6. On the Style tab, from the Display style drop-down list, select Geo Location.

  7. To specify whether the iPhone or iPad will automatically provide its latitude or longitude to answer the prompt, select the Latitude or Longitude option. You will create a total of two Value prompts, one to specify latitude and one to specify longitude.

  8. To save the prompt, select Save As. The Save As dialog box opens. Specify a name, description, and the location in which to save the prompt and click OK.

  9. Repeat the steps above to create a total of two prompts, one for the iPhone or iPad's longitude and one for the latitude.

You can use an Attribute Element prompt to search for elements in a list using the current location of the iPhone or iPad. Users can then select an attribute element from the filtered results.

To create an Attribute Element prompt that uses the iPhone or iPad's geographical location

Prerequisites

  1. Do one of the following:

  2. The Create Prompt page opens with a list of the types of prompts you can create. Click Attribute Element List.

  3. Click Select Attribute. Select the display attribute whose elements will be presented as answers in the prompt and click OK. Users select their filter criteria from a list of these attribute elements.

  4. Choose one of the following options:

  5. On the General tab, specify a title and description for the prompt in the Title and Instructions fields.

  6. To require users to answer the prompt before running the report, specify whether the prompt requires an answer. Select the Prompt answer is required check box.

  7. Set the minimum and maximum number of prompt answers allowed, if desired. Enter these numbers in the Minimum number of answers and Maximum number of answers fields. You can specify a minimum number even if you do not specify a maximum number.

  8. On the Style tab, from the Display style drop-down list, select Geo Location.

  9. From the Select location mapping level drop-down list, select the level at which you want to return the location of the iPhone or iPad when the user answers the prompt. For example, if you select State and the user is located at an address in Boston, Massachusetts, the location of the iPhone or iPad will be returned for the state of Massachusetts.

    Note
    : The levels available are determined automatically by Google.

  10. To select the location mapping attribute to use to filter the element list, click Select Attribute. Browse to and select the attribute, then click OK.

    The location mapping attribute must map the location of the iPhone or iPad as returned by Google to the data you want to filter. This location data must be at the level selected in the Select location mapping level drop-down list. For example, if you want to filter a list of stores by the state in which the iPhone or iPad is located, you can select State as the location mapping level and provide a location mapping attribute that contains separate attribute forms for state location information as returned by Google, and information (such as the store name and store address) for each store.

    Note
    : The location mapping attribute must store location information in the same format that Google uses to provide the location of the user. For example, if the iPhone or iPad is located in Boston, Massachusetts and Google returns Massachusetts, the location mapping attribute must store the state location as Massachusetts and not MA or Mass.

  11. To save the prompt, select Save As. The Save As dialog box opens. Specify a Name, Description, and the location in which to save the prompt and click OK.

Related topics