Summary: In this post I present a non-intrusive bookmarklet to hide the Sections pane in the Qlik Sense Script Editor to provide more real estate for typing script.
Edit: Note in the comments below that hiding the pane can be done out of the box using keyboard shortcuts such as Alt-F11. That reminds me to read the doc! Nevertheless the concept of bookmarklets is useful and this post is bringing in some interesting contributions.
I sometimes wish for a larger window in the Qlik Sense Script Editor where we type statements. This is especially true when I am projecting and I’ve zoomed my browser to make the text legible to the audience, or I’m saddled with a very low resolution.
The UI allows me to hide the Data Connections pane which provides more space, but I’m still left with the Sections pane consuming 250 pixels on the left which may not serve me at the moment.
Wouldn’t it be great if I could hide/show the Sections pane on demand, like I can do with Data Connections? Here’s a simple non-intrusive hack that will allow you to do just that.
Paste the following code in a bookmarklet. If you’re not familiar with bookmarklets, they are small bits of javascript code that can be executed from the bookmarks menu. If you are using Chrome as I do, it’s as simple as pasting the javascript code in the URL property of a bookmark. Google to learn more about bookmarklets. If you are using a browser other than Chrome google to see how to create (if possible) bookmarklets in your browser. Here’s the javascript:
javascript: (function () { var size = ($('.scripteditor-left').css("width") == "0px") ? "250px": "0px"; $('.scripteditor-left').css("width", size); $('.scripteditor-stage').css("left", size); }());
Apply the bookmark and here is what the editor looks like now:
Apply the bookmark again and the Sections pane reappears.
This is an unsupported hack of Qlik Sense. If something else does not work in the editor, you should refresh the browser — which will completely remove any effects of the bookmark — before suspecting or reporting that Qlik Sense has a defect.
This is a very clean technique to add behavior because we have not modified any Qlik Sense files.
I file my QS bookmarklets in a Bookmarks Bar folder named “QS” which gives me easy access in a dropdown to mods I’ve created for Sense.
Here’s another bookmarklet I find useful. This one opens the Qlik Sense script log folder for QS Desktop. My userid in the path is hardcoded, you would of course update to the correct folder name for your machine.
file:///C:/Users/rob/Documents/Qlik/Sense/Log
Please share if you develop additional useful bookmarklets for Qlik Sense.
-Rob
Thanks Rob, this has also been bugging me!
I came up with a slight modification which shrinks the sidebar rather than hides it. Now I have two bookmarklets 🙂
javascript: (function () { var size = ($(‘.scripteditor-left’).css(“width”) == “150px”) ? “250px”: “150px”; $(‘.scripteditor-left’).css(“width”, size); $(‘.scripteditor-stage’).css(“left”, size); }());
Love your work Rob!
Hello Rob! Nice trick. There are also official keyboard shortcuts for doing that. Please try to press Alt+F9 to show/hide left panel or Alt+F11 to expand the script editor to full screen.
See for more: https://help.qlik.com/en-US/sense/April2018/Subsystems/Hub/Content/LoadData/DLE-keyboard-shortcut.htm
Even better. I should read the doc occasionally!
Useful as always, thanks for sharing Rob.
Nice! Thanks for sharing.
It is possible to use Keyboard shortcuts:
Alt+F9 – Shows the left panel or hides it if it is visible.
Alt+F10 – Shows the right panel or hides it if it is visible.
Alt+F11 – Expands the script editor to full screen.
Thanks for pointing this out.
Enlightening as usual, Rob
Regardless of whether it’s part of Qlik’s subsystem, learning how to make and apply these bookmarklets is a great learning experience and how-to. Thanks, Rob
Thanks Rob for sharing ! Sempre fi, Cotiso
Thank you Rob for your Blog. Please be advised that there is an Alternative development method for Qlik Sense or QlikView app by Using GitHub as source control system. You can develop the script in Notepad++ or other editor tools.
For more details, please check the blog as follows:
http://toqlik.com/2018/05/26/alternative-development-method-for-qlik-sense-app-by-using-github/
Hi Rob,
Your JavaScript bookmarks gave me another idea when it came to switching quickly from the Qlik Sense Hub to the Qlik Sense QMC and vice versa:
(for the QMC):
javascript:window.open(‘https://’+window.location.hostname + ‘/qmc/’, ‘_blank’)
(and for the HUB):
javascript:window.open(‘https://’+window.location.hostname + ‘/hub/’, ‘_blank’)
I also made a small usability improvement, which I described in my blog.
Nice idea Markus! Markus’ blog can be found at:
https://ortel.org/easily-switching-between-qlik-sense-hub-and-qlik-sense-qmc/
Hi Rob,
I have a requirement to ” how to get Data Base Name in Qlikview Connection string”, in this connection string i want to export Data Base name in Excel or Text files.
Could you please help to get the connections string Data Base Name in Connection string.
Ex:
ODBC CONNECT TO [xe;DBQ=xe] (XUserId is YJBOAUJOeA, XPassword is ZNBMOUJOeD);
The above Connection string , i want to export “xe;DBQ=xe” this details into Excel sheet.
Can you please help me, and please suggest to me get this details.
Regards,
Bakshu
Do you want to do this in script? Or in the editor? In QlikView or Qlik Sense?
Hi Rob,
Nice one!
I noticed you have a QS Blackboard one as well. Is that one changing the background color by any change? If so, would you care to elaborate?
Thanks!
Hi Johan,
Yes, it is something like that. I’ll blog tomorrow.