Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Button Macro - passing a distinct parameter to an external program

Hi,

I have the following simple button macro below, but the first line fails with the error

>>> Object required: 'ActiveDocument.Fields(...)'

Any idea on how to pass the utelimsi parameter to my IE launch command?

Note that the button only becomes active when a single distinct IMSI is selected.

Many Thanks

Sandy

sub UTEL

set utelimsi = ActiveDocument.Fields("IMSI").GetSelectedValues

set WshShell = CreateObject("WScript.Shell")

WshShell.Run "iexplore.exe http://10.0.1.98/cgi-bin/uqos/tcapsearch.pl??Action=Search&Category=TCAP&From_Date=2009.12.07&From_Time=05:00&To_Date=2009.12.07&To_Time=06:00&Field=imsi&Operator=&Value=&bind1=and&Sub=&bind2=and&Expression=((imsi="&utelimsi.item(0)&"))&Button=View",3,true

end sub



2 Replies
Not applicable
Author

You need to extract the text string from that object containing an array.

After the set utelimsi... statement do this:

utelimsi_txt = utelimsi.Item(0).Text

and then use utelimsi, which now contains simple text, as you build your command line.

Not applicable
Author

Thanks Tim,

even after adding the 0 array line it still fails at the same line just before?

I am using v8.

Cheers

Sandy