Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Lisa_Sun
Support
Support

Is it possible to retrieve AppId then pass this as the parameter in Widget?

Hi Team,


Is that possible to retrieve AppId then pass this as the parameter in Widget?

For instance, the code is very simple:

<iframe src='https://feiqs.visual.visualintelligence.co.nz/single/?appid={{settings.AppID}}&obj={{settings.ObjectID}}&opt=nointeraction&select=clearall' style='border:none;'></iframe>

If you edit the code by replacing the app id and object id from some app in your environment (for example: <iframe src='https://feiqs.visual.visualintelligence.co.nz/single/?appid=287647b9-e2da-48e5-9f17-9037fa2d6e4b&obj...' style='border:none;'></iframe>), this code works. However what I want is that users can define the app id and object id in the settings, which will then be passed to the code by the variables {{settings.AppID}} and {{settings.ObjectID}}.

These two variables don't work, they cannot pass the app id and object id defined by the users to the code.

I Have done a lots of research but could not find anywhere mentioned we can get AppID and ObjectID through setting in widget and pass it as parameter.

In the link http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/Extensions/Content/Widget/widget..., we only have three properties are available to be bound to your HTML or your CSS templates.

Title {{settings.title}}

Subtitle {{settings.subtitle}}

Footnote {{settings.footnote}}

So it seems others won't be supported.

This link also mentioned Data binding is realized using AngularJS. But AngularJS is the third party. There is no any information or example how to pass settings properties to HTML. Did the test but it does not work.

1.http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/qlik...

2.http://qliksite.io/tutorials/qliksense-widgets-tutorial/subjects/actions/

Is anyone having the idea?

Thank you

Lisa

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
1 Solution

Accepted Solutions
bgk
Employee
Employee

Hello,

I am not sure what you would like to do. Do you want to dynamically add a visualization in a Sense application based on user input? Do you want to embed an object on a webpage (Mashup?).

The calls to use is in the Capability API and are as follows but can only be used in a Mashup or extension.

You can receive a list of all applications and their appid by using this call

getAppList method ‒ Qlik Sense Developers

and get all objects in an app by using:

getAppObjectList method ‒ Qlik Sense Developers

You get an object using the visualization api by using

get method ‒ Qlik Sense Developers

Best Regards

Jonas

View solution in original post

4 Replies
bgk
Employee
Employee

Hello,

I am not sure what you would like to do. Do you want to dynamically add a visualization in a Sense application based on user input? Do you want to embed an object on a webpage (Mashup?).

The calls to use is in the Capability API and are as follows but can only be used in a Mashup or extension.

You can receive a list of all applications and their appid by using this call

getAppList method ‒ Qlik Sense Developers

and get all objects in an app by using:

getAppObjectList method ‒ Qlik Sense Developers

You get an object using the visualization api by using

get method ‒ Qlik Sense Developers

Best Regards

Jonas

Lisa_Sun
Support
Support
Author

Hi Jonas,

Thank you very much for the help.  This information is very helpful.

I would like to clarify my understanding. So basically we can use the API to get app id and object id in widget as well, it is just not recommended.  Is that correct?

Is that possible to achive the same feature like the one in this video?  The client wants to be able to select appid from the settings in widget then switch among these apps.

Qlik Sense 3.0 - Widget - Quick Demo - YouTube

Many thanks again

Best Regards

Lisa

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
bgk
Employee
Employee

Hello Lisa,

No, you can't call upon these function within a widget. If the customer would like to use data from multiple applications I suggest they create a mashup where it is possible to open several applications and add objects from these. Consider looking into the mashup editor for support on how to do this.

Best Regards

Jonas

Lisa_Sun
Support
Support
Author

Hi Jonas,

Thank you very much once again.

I have a bit part unclear and would like to clarify with you.

My understanding is the technically this is possible for widget to use Javascript in HTML to call this Javascript API.  But this is not the designed purpose of Widget.  Hence it will be encouraged to do it through extension.  Is that right?

Or do you mean Widget won't work if we put Javascript API, then will that be a documentation bug?  From the below help link, we have clearly mentioned, this API can be used for widget as well.

API reference ‒ Qlik Sense Developers

Use these resources to build and bring capabilities into visualization extensions (), widgets (), custom components () and mashups


Best Regards

Lisa

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!