Skip to main content
Alexander_Thor
Employee
Employee

2 years ago I was certain that the tablet craze would not reach the business world.

I was convinced that our smart phones were too small and limited to provide any real business value.

I was wrong. Dead wrong.

Since then we have stopped talking about mobile or desktop, instead we talk about software. We expect the software we use to work everywhere, anytime and on any device.

Luckily QlikView makes it easy for us; the AJAX-client works just as well in the browser as it does on a tablet or even on a smartphone.

However every device comes with its own screen real estate so if we optimize our apps for a desktop experience our tablet users will be less than pleased and vice versa. Technically the app would work on all devices but if you were on an iPad perhaps the buttons should be a tad bit bigger, the width and maybe the length of the app smaller and so on.

So how do we achieve this without having to deploy one app optimized for every device/screen?

Not only would that be a maintenance nightmare but it would also scale horrible as we would potentially have to load the same application twice into the working memory.

ClientPlatform() to the rescue!

ClientPlatform() returns a string containing the platform the user is using, see table below.

With this information we could switch between a dashboard optimized for a desktop experience and a tablet experience depending on the device the user is using at the time within the same QlikView application.

For example using WildMatch(ClientPlatform(),'*mobile*') = 1 in a Show Condition would enable the sheet or object for mobile devices but it would be hidden for a desktop user.

Now we can design our apps to cater for a perfect user experience regardless of which device the user is using.

If you own an iPad you can see it in action by visiting our demo site and browse to the Pro Golf app which will change look and feel between a desktop and an iPad.

This is a few examples on what the ClientPlatform() can return.

Browser

ClientPlatform()

Internet Explorer <VersionNumber>

browser.MSIE <VersionNumber>

Google Chrome

browser.chrome

Firefox <VersionNumber>

browser.gecko <VersionNumber>

iPad

browser.safari.mobile

Android Tablet

browser.android

19 Comments