Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create new objects dynamically from load script?

Hi,

IS it possible to create objects (buttons, filters and etc.) dynamically from a load script? without using a macro?

Thanks,

Boris

13 Replies
Not applicable
Author

The solution is going to be using a macro to create and object and activating it with an action on a document open and then changing the value of a variable.

Do you know how to address a variabale from a macro script?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can manage variables using the macro API. Is this an app that is meant to run in a server?  You should not manipulate object properties in server apps. Or are you planning to do the config in a desktop run and then move to the server?

-Rob

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Creating UI objects based on the data in Internal Tables is perfectly possible with a macro triggered by the OnPostReload event. But this will only work in QV Desktop or the OCX component (plug-in).

Check APIGuide.qvw for functions like CreateStraightTable. It's gonna be a complex job, however...

To manipulate variables from your macro, you can use stuff like

ActiveDocument.Variables("VariableName").GetContent

ActiveDocument.Variables("VariableName").SetContent ContentData

Also see the APIGuide.qvw document

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I would think you could handle this with Conditional Dimensions much easier than the macro API.

-Rob