Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator II
Creator II

API guide usage

Hi Experts,

I need help on using API guide to create macro.

I am new to programming so not aware of object model, however i have good experience in qlikview scripting(loops, joins, concatenate, lookup etc).

I am thinking the API guide as a alternate to actions available in qlikview. so the macro is to change the property of qlikview object already present in the document. Am i right?

I will learn the vb script syntax, but i am not sure how can i pick the object properties from the API guide.

Please let me know if my approach is correct and guide me to overcome the above issues?

API GUIDE - Version 11


Thanks!

6 Replies
Clever_Anjos
Employee
Employee

Please be aware this macro would be discontinued into future versions

Clever_Anjos
Employee
Employee

Anyway, use this to study Useful Qlikview Macros

surajap123
Creator II
Creator II
Author

Hi Clever,

Thanks for the information.

I have already gone though the link.

Could you guide me to create a small macro using the api guide with step by step navigation, if possible.

Thanks.

Clever_Anjos
Employee
Employee

Using your qlikview and an opened qvw

1 - Type Control-M (will open the macro script editor)

2 - Write

Sub HelloWorld

     Msgbox("Hello World")

end Sub

3 - Click  "Check" and inspects if "ready" is displayed

Capturar.PNG

4 - Click OK (will close macro editor)

5 - Create a button and configure like this

Capturar.PNG

6- Click your button

Capturar.PNG

surajap123
Creator II
Creator II
Author

Thanks for the steps.

However i was expecting the steps staring from taking some property of qv object for API guide(sheet name-> selection(S) to pick property etc) and using that in qlikview macro window(this step you have explained).

Sorry if i am not very clean with my question. My main issue is understanding the API guide as i am not aware object model.

Clever_Anjos
Employee
Employee

A macro needs a firing trigger.

Some objects have a "click" (button, text box, etc)

you can attach an action (runs a macro) to a field selection, to a variable change, etc

Please check "Triggers" tab at your document properties to see some triggers that are available