Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
We developed an application on a screen that is 1920x1080 but we discovered a user has a 1366x760 screen resolution so we were looking for a solution to this that could be scalable. Our idea was to create different sheets based on different screen resolutons and than display the right one based on the resolution of the screen the app is working on.
My question so is, is there a way to retrieve the display resolution in qlik sense? are there extensions that can achieve this task?
Hello,
If my understanding is correct, you want to build multiple sheets that contain the same visualizations, but different sheet size. Then you want to hide the sheets and display them only if the screen resolution of the user matches the sheet's specified size dimensions.
I would suggest build the sheets only once and leave the option Sheet size to Responsive. This way Qlik Sense will make all of the visualizations responsive on any screen size. This is a good practice because:
If you still would like to have this option then you can probably achieve this by creating your own custom extension. I was unable to find a custom extension that can do this for you, however you might be able to achieve this with further research on your own. Some information that might help you is:
let screenResolutionWidth = window.screen.width;
let screenResolutionHeight = window.screen.height;
var div = `<div>The device's screen resolution is: ${screenResolutionWidth}px x ${screenResolutionHeight}px</div>`;
This will give you the following details:
As you can see, it is an extension that shows you the resolution of your device
Then you can have an variable and find a way to update this variable with your custom extension. This link[2] might help with this.
On one sheet you can update the Show condition as =varScreenHeight = '1080' and varScreenWidth = '1920'.
On the other sheet you can update the Show condition as =varScreenHeight = '760' and varScreenWidth = '1366'.
Now when you manage to create the custom extension that will update the variable based on the values that it will get of the screen resolution, your sheets will hide and unhide accordingly.
I hope that this information was helpful.
---
[2] https://community.qlik.com/t5/Integration-Extension-APIs/Extension-Variable-set/td-p/1573180
Hello,
If my understanding is correct, you want to build multiple sheets that contain the same visualizations, but different sheet size. Then you want to hide the sheets and display them only if the screen resolution of the user matches the sheet's specified size dimensions.
I would suggest build the sheets only once and leave the option Sheet size to Responsive. This way Qlik Sense will make all of the visualizations responsive on any screen size. This is a good practice because:
If you still would like to have this option then you can probably achieve this by creating your own custom extension. I was unable to find a custom extension that can do this for you, however you might be able to achieve this with further research on your own. Some information that might help you is:
let screenResolutionWidth = window.screen.width;
let screenResolutionHeight = window.screen.height;
var div = `<div>The device's screen resolution is: ${screenResolutionWidth}px x ${screenResolutionHeight}px</div>`;
This will give you the following details:
As you can see, it is an extension that shows you the resolution of your device
Then you can have an variable and find a way to update this variable with your custom extension. This link[2] might help with this.
On one sheet you can update the Show condition as =varScreenHeight = '1080' and varScreenWidth = '1920'.
On the other sheet you can update the Show condition as =varScreenHeight = '760' and varScreenWidth = '1366'.
Now when you manage to create the custom extension that will update the variable based on the values that it will get of the screen resolution, your sheets will hide and unhide accordingly.
I hope that this information was helpful.
---
[2] https://community.qlik.com/t5/Integration-Extension-APIs/Extension-Variable-set/td-p/1573180