i'm new to QlikSense and have created two separate apps, one for sales and one for finance.
Both apps have common fields such as BU (Business Unit), Calendar, etc.
Now, I've created a mashup involving objects from both apps and facing the following issue:
assuming i have a table of sales summary per BU (from sales app) and a bar chart for organization expenses per period and BU (from finance app).
when i'm selecting in the mashup a BU from the the sales table the table is filtered accordingly BUT the chart from the finance app which also contains a BU field - DOESN'T filtered.
is that the right behaviour?
is it possible to combine objects from different apps and they will effect each other when it comes to common fields?
of course, when i'm making selections in fields which are NOT common I'm NOT expecting that one object's selection WON'T effect objects from other apps.
That's the way it works, selections are made in one app. If you want them to be coordinated between apps you need to write some code for that. Alternatively merge the two apps and Qlik Sense will take care of it for you.
If you want them to be coordinated between apps you need to write some code for that
Hi Erik, thanks for your quick reply
did you mean HyperCubes?
just saw an older post regarding that issue which I didn't understand what should be done in order to handle it.
didn't mean to get a 'step-by-step' guide but a high level description of the steps that are required in order to achieve that solution.
We had a similar situation. Here is what we did.
1. Classify one app as primary and another app as secondary.
2. Show the filter component from the primary app that has the common filters
3. add listener to listen to the selection event
4. In the listener, pass the selection values to the secondary app
What you will lose? selection on chart objects from secondary app will not reflect on the primary app. We negotiated with customers to make selections from the filter components and disabled selections on those chcarts
What you gain? No overhead of writing custom filter components and hence no worry about performance.
We have a sample project created in GitHub: https://github.com/CodeAtRoost/Qliksense_Selection_between_apps/blob/master/README.md
Please check it out. Its made using the Help desk Management qvf which is one of the default apps with Qlik. So you will not have any issues testing it out. There is a detailed explanation of the code as well.
If you do not want to disable chart selections, then you have to build custom filter components.
Basically you need to listen to selections in one app, probably using ListObjects. When the contents of the ListObjects change, you need to make the corresponding changes in the other app. You can do that with field.select.
I assume that you only allow selections in one of the apps. If you transfer selections in both directions, it's much more complicated.
Hi Nivedha, this extension is awesome! But i have a problem.
With number values the code transform to text and he can't filter the other app cause the value is a number.
I tried to add some lines os code that verifies if the value of the array is a number or a string but i dont succeed.
Can u help me?
This is what a wrote:
cacheString=cacheString + '@' + value.fieldName +"~" + value.qSelected;
var m = valArray
m = number(m);
valArray.push(value.qName); inside the listener function to
isNaN(value.qName) ? valArray.push(value.qName):valArray.push(Number(value.qName));
Please let me know if this works. Good catch, though!!
You also may want to convert the valArray values into numbers if its a number dimension (using the same logic as above), in the retrieveSelectionfromCache() if you are using filter across pages.
First of all thanks for the quickly reply!
I replaced the "valArray.push(value.qName);" line inside the listener function and at first it worked.
But if i select a text and then i select a number the filter seems dont recognize the number. Or if i select a number and then a text, the filter dont recognize the text. This also happens when i make two text filters in a row.
If i go to code line, change something(can be a comma) and save, the app starts to recognize the filters...
Do u know what could be?