Qlik Community

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Coming Aug. 9: New Simplified Authoring for Qlik Sense SaaS – For Details, CLICK HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
bep
Employee
Employee

Sense Extension - Retrieve and paint object based on Object Id

Hey all,

I am new to extensions and have been experimenting and I am hoping there is a easy solution to my question. 

What I am trying to do is to render an existing object to the sheet based on that object's id. 

I have coded up a simple extension that will take in a object id as a parameter, I can programmatically retrieve the object Id but I can't figure out how to render it to the screen in the underlying java script.

Any guidance would be appreciated.

1 Solution

Accepted Solutions
bep
Employee
Employee
Author

So to answer my own question..  leverage the App API: qlik.app.getObject(elem, id, options)

Snippet highlighting key elements

var html = "<div id='vizId' style=...></div>";

var app = qlik.currApp(this);

...

app.getObject( "vizId", objectId );

...

$element.html( html );

More can be found here: API Reference

View solution in original post

1 Reply
bep
Employee
Employee
Author

So to answer my own question..  leverage the App API: qlik.app.getObject(elem, id, options)

Snippet highlighting key elements

var html = "<div id='vizId' style=...></div>";

var app = qlik.currApp(this);

...

app.getObject( "vizId", objectId );

...

$element.html( html );

More can be found here: API Reference