Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Anonymous
Not applicable
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
Anonymous
Not applicable
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