Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
martinien
Partner - Contributor III
Partner - Contributor III

Link selections on a mashup with several apps

Hi qlik devs!

I want to build a mashup with several apps. These apps have some common fields used as dimension (Country, Product family....).

I want selections made on these fields to be applied to all the apps used by the mashup.

Has anyone done this kind of things?

I guess it can be done using

app.getList("CurrentSelections", .....

To listen to selection change, and then applying these to all apps. Probably using some buffer to store last state and trigger selections on change in order to avoid infinite loops.

I'd be glad to have some thoughts and feedback on this.

Martin

1 Solution

Accepted Solutions
ErikWetterberg

Hi Martin,

I have done some work on this. Some recommendations:

- use one app as a master app, where the user makes selections in the common fields

- listen to the selections with List objects, created with createList

- propagate the selections to the other apps with field.select

Hope you find this helpful

Erik Wetterberg

View solution in original post

4 Replies
Anonymous
Not applicable

What you are suggesting sounds viable, although I have never tried it.

What I generally do for a mashup is a create dedicated qvf app for it.  So maybe you could create a single qvf app that contains the data your mashup needs, as opposed to trying to sync several qvf data source apps.  This may sound a bit of a palaver but I reckon would be quicker to do and end up with a more efficient and reliable mashup.

ErikWetterberg

Hi Martin,

I have done some work on this. Some recommendations:

- use one app as a master app, where the user makes selections in the common fields

- listen to the selections with List objects, created with createList

- propagate the selections to the other apps with field.select

Hope you find this helpful

Erik Wetterberg

martinien
Partner - Contributor III
Partner - Contributor III
Author

Hi,

Thanks again for the tips!

Using the createList method was clearly a better idea than dealing with the whole CurrentSelections object.

In the end I only had to propagate selections on a defined user action so I used createList to get selections, field.select to apply them and destroyed the list object in the end.

Martin

srik00001
Contributor III
Contributor III

Hi Martin/Erik,

Can you share the code of how you achieved this? I am new to coding and trying to build process that applies the selections from one mashup to another.

Thanks,

Sri