Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

learning API

Hello,

I would to learn some thing about QV Macros.

I create the wrond script and I need some one could to correct the scrip I wrote.

Please I would to have one msg box with 2 line write into.

The event is join to a button. If I press the button the msgbox appears and gets me the the result. I used the For loop to learn how QV works in API script.

sub Message

set v=ActiveDocument.Variables(2)

FOR a=0 to v.GetContent.Number

ActiveDocument.Getapplication.MsgBox("Fine Conteggio ")& v.GetContent.Number

Next
end sub

thanks and best regards

Tags (1)
4 Replies
Not applicable

learning API

Hi,

what's your question?

Best regards

Stefan

Not applicable

learning API

hi,

sorry for my english. however I would to learn a script with the button, for loop msgBox.

In the scrip I posted I try to create small application where I press the button, the for loop creeate mexages and the msgBos shows the messages. Naturally my script is not correct. Please have a look the script?

BR

Slthanks

Not applicable

learning API

If I understand correctly, you need to set the values in a single variable and then display just one message box at the end?

In your loop set a variable to its current value with the additional value you want appended to it (chr(10) forces a new line):

vMsg = vMsg & chr(10) & v.GetContent.Number

Then after the loop display the values:

ActiveDocument.Getapplication.MsgBox vMsg

Hope this helps,

Gordon

Not applicable

learning API

Hello! Perhaps you mean this

sub MostraVar
set vars = ActiveDocument.GetVariableDescriptions
for i = 0 to vars.Count - 1
set v = vars.Item(i)
msgbox(v.Name)
next
MsgBox("Nr Variabili Programma: " & vars.Count)
end sub



Ciao Big Smile



Daniela

PS: Ma se sei italiano ..... prova prima a chiedere nel nostro gruppo





Community Browser