Dropdown with multiple selections

Hello there,

Today I’m going to show a hack of  how to allow multiple selections using a dropdown.

Felipe César sent me that tip. Thank you, Felipe. I really appreciate that.

To create this dropdown you will need to:

  1. Create a Dropdown selector as usual;
  2. Right click on the selector and select Properties and formatting;
  3. Go the Layout and select from the DHTML style “Listbox” and check “Allow multiple selections”
  4. Go to Theme and select Light Theme
  5. Go back to Layout and select Dropdown
  6. Go back to Theme and select None
  7. Click OK and you will have something like this:

Hope it helps.

God bless you!

Modifying the iPad/iPhone Mstr mobile app settings programatically

Hello there,

Today let’s talk about how to change the MicroStrategy Mobile app settings using Objective C. To do that you will have to use the latest XCode version and the latest MicroStrategy Mobile SDK version as well. Currently I used XCode 8.2.1 and MicroStrategy Mobile SDK 10.4

I had to modify the app to Offline Mode when the user is not connected to the VPN and I couldn’t the code to do that. So, to help you guys, here I’ll explain how to turn on/off the offline mode and how to change the other options too.

First things first.

Step 1: You have to create a custom app delegate class: https://lw.microstrategy.com/msdz/MSDL/104/docs/projects/MobileSDK/Default.htm#topics/iOS/iOS_Adding_Functionality_with_a_CustomApplDelegate.htm?Highlight=creating a custom

Step 2: Add the BooleanPreference.h file to the Custom Folder:

Just right click on the Custom folder and select “New File”and create a new header file. The name of the file must be BooleanPreference.h

Copy this content into this file:

#import <Foundation/Foundation.h>
@class MSIDevicePreferences;
@interface BooleanPreference : NSObject {
@private
    NSString* prefID;
    BOOL booleanValue;
    MSIDevicePreferences * __weak parent;
}
@property (nonatomic, copy) NSString* prefID;
@property (nonatomic) BOOL booleanValue;
-(BooleanPreference*)initWithID:(NSString*)_prefID boolValue:(BOOL)_value;
@end

Step 3: Your CustomAppDelegate.h must looks like this:

#import <UIKit/UIKit.h>
#import <MicrostrategyMobileSDK/MSIAppDelegateImpl.h>
#import <MicrostrategyMobileSDK/MSICommanderDelegate.h>
#import <MicrostrategyMobileSDK/MSIPreferencesStore.h>
#import <BooleanPreference.h>
@interface CustomAppDelegate : MSIAppDelegateImpl
@end

Step 4: Your CustomAppDelegate.m must looks like this:

#import “CustomAppDelegate.h”
@implementation CustomAppDelegate
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
BOOL res = [super application:application didFinishLaunchingWithOptions:launchOptions];
// Retrieve preferences
MSIPreferencesStore *store = [MSIPreferencesStore preferencesStore];
MSIDevicePreferences *dp= [store preferencesCopy];
BooleanPreference *boolPref = [dp getIsOfflineMode]; // Here, instead of using “getIsOfflineMode” you will be able to use the other possible options. Just remove it and start typing again and // XCode will show you the other options here
//Offline Mode on
boolPref.booleanValue = YES;
// Store new preferences
[store storePreferences:dp];
}
@end

That is it.

Hope it helps!

Just let me know if you need help with your code.

God bless you!

Best practices while using offline mode for MicroStrategy Mobile

Hello there,

I found a very good TN that explains the best practices when  using Microstrategy mobile in offline mode.

Below is the link:

https://community.microstrategy.com/t5/Mobile/TN199366-Best-practices-to-design-or-utilize-mobile-dashboards/ta-p/199366

 

Hope it helps.

God bless you!