Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Checking which client is being used on Open

Hi,

Is there a way to check to see if the user is using web or application? I'mcreating a button that will open another Qlikview document, however depending o whether they are using the web or application will determin the path.

Cheers

Simon

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The DocumentPath() function returns the path and name of the current document. Perhaps you could use this?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
Not applicable
Author

Hi Simon,

there is a trick. You can use the expression ClientPlatform() <> '' as conditional expression for your switch button (properties->layout->show conditional expression). If the client is IE Plugin or Fat client, the ClientPlatform() returns an empty string. All other versions - like the web client - will return a valid string.

Best

Sacho

Not applicable
Author

Hi,

THanks for that, but it doesn't help me as we use the pugin and i need to determin whether its using the application or a browser.

Any ideas?

Cheers

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The DocumentPath() function returns the path and name of the current document. Perhaps you could use this?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Simon,

I think the solution from Jonathan could be useful. Another approach are macros. First you have to create a variable called vIsAjaxClient. Now you implement the following macro:

'*************************************************************

function isAjaxClient

'*************************************************************

    on error resume next

    fMode =    true

    fMode = ActiveDocument.GetApplication.GetUserPreferences.UseAjaxUI

    ActiveDocument.Variables("vIsAjaxClient").SetContent fMode, true

    isAjaxClient = fMode

end function

Then you create a trigger (document property) for "on document open -> run macro -> isAjaxClient".

Reopen your document. Now you are able to use a button with an action like this:

=if (vIsAjaxClient, 'http://lala.com', 'http://google.com')

As an alternative the visibility (layout -> show conditional) of the button could be set via the variable vIsAjaxClient.

Best

Sacho

Not applicable
Author

Thank you for your replies.

I think the easiest is to use the DocumentPath as these are different.

THank you once agan