Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
EvaMaria
Contributor
Contributor

Mashup Filtering Multiple Apps

Hi all

I am facing following problem: I tried building a mashup using objects from multiple apps. As I have identical fields in both apps I changed the js-code by applying the code (from http://www.codewander.com/qlik-sense-mashup-apply-filters-across-two-or-more-apps/ ) as follows to my second app (the app I want to select whatever is selected in my first app):

var selState = app.selectionState( );
var listener = function() {
app2.clearAll();
var selFields = selState.selections;
if (selFields!=null){
$.each(selFields, function(key, value) {
var valArray=[];
$.each(value.selectedValues, function(key,value){
isNaN(value.qName) ? valArray.push(value.qName):valArray.push(Number(value.qName));
})
app2.field(value.fieldName).selectValues(valArray);
});
}
};
selState.OnData.bind( listener );

 

If I make a selection in a number-field it's working

If I make a selection in a text-field it's working.

But only for the very first field I make a selection in.

Selections I make in a second or third field are not applied to my second app. 

However, I noticed that it IS working as expected if I have my two application opend in the browser while making selections in the mashup. (What is definitely not what I want to need to do 🙂 )

Any ideas what I am doing wrong?

 

Thanks a lot in advance!

Labels (1)
1 Reply
ErikWetterberg

Try setting the toggle parameter in the selectValues call to false.