Skip to content

Instantly share code, notes, and snippets.

//Note the use of "s.create(...) below
//a=["qvangular", "core.utils/authentication", "core.utils/deferred", "core.utils/websocket", "general.controllers/error-handler-controller", "general.controllers/warning-handler-controller", "enigma", "enigma-sense-utilities", "autogenerated/qix/engine-api", "autogenerated/qix/engine-enums", "util", "translator", "core.models/mixins/all"];
//(function(e, t, n, i, r, o, s, a, l, c, u, h, d) { console.log(s);})(...a)
//logs "s";
//whose value is: 'enigma'
//l must be module "autogenerated/qix/engine-api"
define("core.models/communication", ["qvangular", "core.utils/authentication", "core.utils/deferred", "core.utils/websocket", "general.controllers/error-handler-controller", "general.controllers/warning-handler-controller", "enigma", "enigma-sense-utilities", "autogenerated/qix/engine-api", "autogenerated/qix/engine-enums", "util", "translator", "core.models/mixins/all"], function(e, t, n, i, r, o, s, a, l, c, u, h, d) {
// module for popoover
o = g.default.module("leonardo-ui.popover", []);
//service for the popover
o.service("luiPopover", ["$q", "luiOverlay", function(a, b) {
var c = function() {
var a = 0;
return function() {
return "lui-popover-" + a++
}

///$tab api\r\n

The above comment will create a tab named 'api'

You can type this in the Data Load Editor directly (without an API); save your script, and reload the page Your new tab will appear; the $ is not escaped somehow; your command is interpreted by the UI next time; But this does require a refresh/reload

//This "Data connection" (in Qlik) in our "Library" represent sthe REST
// https://betaapi.xbrl.us/api/v1/fact/search?entity.cik=0001138723&concept.local-name=Assets&period.fiscal-period=Y&period.fiscal-year=2016,2015,2014&fields=fact.*
//Is this necessary? Yes, but I don't know why;
//I overwrite most of its configurations (the URL, the query parameters, the HTTP headers), below
//Without a data connection, Qlik logs:
// > The following error occurred:
// > There is no open data connection.
LIB CONNECT TO 'xbrl_api (qtsel_nnd)';
//applyBookmark( item, $event )
//ng-click="applyBookmark( item, $event )"
//<div tid="bmSectionRepeat" class="bm-action ng-scope" ng-repeat="item in section.list | orderBy:sortFn track by item.qInfo.qId" ng-if="isItemVisible( item )" qva-context-menu="onContextMenu( $event, item )" ng-click="applyBookmark( item, $event )" role="button" tabindex="0">
// client.utils/routing
define("client.utils/routing", ["general.controllers/route-controller", "util"], function(a, b) {
"use strict";
...
goToSheet: function(b, d) {
.factory('smartRegExp', [function(){
return {
get : function(searchTerm){
searchTerm = searchTerm || '';
var quoteMatch = searchTerm.match(/^"(.*)"$/);
var regExp;
const LIST_LIMIT = 10000;
const FIELD_TO_LIST = 'field_name';
//createListObject({
qlik.currApp().model.enigmaModel.createSessionObject({
"qInfo": {
"qType": "listbox"
},
"qListObjectDef": {
"qDef": {
"qFieldLabels": [
{"jsonrpc":"2.0","id":9,"delta":true,"result":{"qLayout":[{"op":"add","path":"/","value":{"qInfo":{"qId":"SheetList","qType":"SheetList"},"qSelectionInfo":{},"qAppObjectList":{"qItems":[{"qInfo":{"qId":"4e4f7331-ab87-40dc-b5fe-53e9701cef71","qType":"sheet"},"qMeta":{"title":"stacked bar plus line","description":"","privileges":["read","update","delete","publish"],"modifiedDate":"2018-04-19T13:34:30.830Z","published":false,"publishTime":"1753-01-01T00:00:00.000Z","approved":false,"owner":{"id":"cac9ac70-6ed0-4f8b-8731-dbf3323c3faa","userId":"nnd","userDirectory":"QTSEL","name":"nnd","privileges":null},"qSize":-1,"sourceObject":"","draftObject":""},"qData":{"rank":0,"thumbnail":{"qStaticContentUrl":{}},"columns":24,"rows":12,"cells":[{"name":"RztfDu","type":"combochart","col":0,"row":0,"colspan":12,"rowspan":12},{"name":"BLgpPS","type":"filterpane","col":12,"row":0,"colspan":6,"rowspan":5},{"name":"rEwHLHT","type":"table","col":18,"row":0,"colspan":6,"rowspan":5},{"name":"MqFA","type":"table","col":18,"row":8,"
LOAD * INLINE [
Period, Type, Name, Cost 1, Cost 2
Current, Fruit, Banana, 0.5, 0.2
Current, Fruit, Apple, 1, 0.3
Current, Fruit, Orange, 1.5, 1
Current, Fruit, Plum, 0.1, 0.1
Prior, Fruit, Banana, 0.6, 0.25
Prior, Fruit, Apple, 0.2, 0.15
Prior, Fruit, Orange, 1.1, 1.2
];

Cells in HTML Matrix

Have a class:

  1. access_no (white)
  2. access_dis (yellow)
  3. access_ok (green)

Reminder the Qlik rules

| Color | Description | |