Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to detect if IEPlugin or AJAX is used

Hi,

In a VBScript macro, I want to do something like:

If viewedWithIEPlugin then

     doAction1;

else

     doAction2;

end if

How to do that?

Thank you

1 Solution

Accepted Solutions
Not applicable
Author

I was unable to use ClientPlatform() from a VBScript macro, even when stored in a variable.

Instead I used ActiveDocument.GetApplication.QTProduct and it worked for me.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Hi,

You should be able to use the ClientPlatform( ) function.

Returns the name of the platform the client is using, for example, Mobile.iPhone.

All mobile clients start with Mobile, a period sign and the type of mobile device. Clients using AJAX will return Browser.Nameofbrowser, for example Browser.Firefox.

For Plugin or Standalone QV the returned value will be blank (which should allow you to target these clients as well with a separate action).

From the F1 help:

"The function will only return the client type for those clients using the QVPX protocol, that is the mobile clients and the AJAX client."

Not applicable
Author

Thanks a lot I'll try that

Not applicable
Author

I was unable to use ClientPlatform() from a VBScript macro, even when stored in a variable.

Instead I used ActiveDocument.GetApplication.QTProduct and it worked for me.

Not applicable
Author

ClientPlatform() function returns a blank value for IE Plugin and Standalone client. Below macro should give you the result.

Function GetClientPlatform
    Platform = ActiveDocument.Evaluate("ClientPlatform()")
     if isnull(Platform) or Len(Platform)=0 then
     GetClientPlatform = "Plugin or Standalone Platform"
     'Msgbox("Plugin or Standalone Platform")

      else
     GetClientPlatform = Platform
     ' Msgbox(Platform)
     end if
end function

Not applicable
Author

I see thanks

I didn't know about this "evaluate" function but it seems to be quite useful

alex_stone
Creator
Creator

Could you please show me the detailed steps that how to use ActiveDocument.GetApplication.QTProduct?

Thanks.