MicroStrategy ONE

Read Widget Properties in iOS

Certain out-of-the-box widgets shipped with MicroStrategy Mobile have properties which are assigned in the document editor and stored in the metadata. You can build a properties editor for a custom widget, which lets document developers assign different parameters to the visualization without having to recompile the application on the client.

This is very useful since a widget can work in many different ways depending on the settings assigned in the document editor. Changing certain settings that affect the widget's behavior do not necessarily require that the widget’s code be updated, the application recompiled, and the app reshipped.

The code snippet below illustrates how to read widget properties inside the custom widget’s code.

Copy
MSIModelData *modelData = (MSIModelData *)[widgetHelper dataProvider];
    
NSString* propertyString = [modelData visualizationPropertyByName:@"visualizationPropertyName"];