Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Macro for opening URL

Hi all,

From last 4 days i'm searching for the macro code that should work like "Open URL" function in Actions. And also the macro should work in AJAX access point also.

Please let me know is it possible or not ?

Greatly appreciated for your response.

Regards,

Venkat.

Labels (2)
9 Replies
Not applicable

Re: Macro for opening URL

Can't you use the action itself?

Because as far as I have experienced, macros either don't work or display some weird behaviour in AJAX.

So my suggestion would be refrain from using macros.

MVP
MVP

Re: Macro for opening URL


Hi,

No need of macro, you can just achieve this using text box and triggers.  Please find attached file for solution.

Hope it helps you.

Regards,

Jagan.

Not applicable

Re: Macro for opening URL

Hi,

On selecting a field value in a listbox it should open the web URL and i don't want any extra step to do user for opening the URL(i.e; Not to have Button click).

"Open URL" action is not working for field "On Select" event trigger so that's why i had choossen for Macro code. And i got a macro which works fine in "IE Plugin" but not supports in "AJAX". So i was looking eagerly for the macro that should also work in AJAX.

sub OpenURL

if ActiveDocument.Fields("Link").getSelectedValues.Count = 1 then

ActiveDocument.GetApplication.Launch ActiveDocument.Evaluate("http:\\WWW.GOOGLE.COM"),""

ActiveDocument.Back 'Go back so we don't do the selection

end if

end sub


Thanks in advance.


Regards,

Venkat

Not applicable

Re: Macro for opening URL

Hi Venkat,

Achieving the same requirement using a list box is not possible.

Instead you can use the same field in a straight table expression and change the representation as Link (Example Attached).

Hope this will sort out your issue.

* Only if the field values are the web links.

--

Vinoth

Not applicable

Re: Macro for opening URL

Hi Jagan,

I needs to display all images in listbox bcoz should be visible like m*n rows, The look & feel should like be as below image. I think this type of view is not possible by Textbox.

If i click on any image cell then it should open its image link .

Capture.PNG.png

Greatly appreciated for your response on this.

Regards,

Venkat

Not applicable

Re: Macro for opening URL

Ok. So now the question is, on what event are you using the action"Run Macro"?

Reason being, AJAX does not support "OnChange" of variable , as far as "OnSelect" is concerned, it should work in AJAX.

Refer to this:http://community.qlik.com/message/336101 for macros which work with AJAX and which don't.

Another approach is as suggested by Vinoth Kumar Rajendran, you can make that straight table look like a list box.

Thsi is the only way which I can think about as of now.

Not applicable

Re: Macro for opening URL

Hi Shyamal,

I'm using the action "On Select" in field event trigger. And i seen the approach that what Vinoth Kumar Rajendran has provided, but i can't make the visibility like "M*N" matrix in straight table.

Is there any chance of working exactly with same requirement like macro which works in AJAX also ?

Thanks in advance.

MVP
MVP

Re: Macro for opening URL

Hi Venkat,

Can you attach sample file, so that it would be easier to provide the solution.

Regards,

Jagan.

Not applicable

Re: Re: Macro for opening URL

Please find the attached app.

Community Browser