mirror of
https://github.com/jprdonnelly/qseow-scripts.git
synced 2026-05-10 15:00:07 -04:00
47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
require("amd-loader");
|
|
|
|
define(function() {
|
|
return function() {
|
|
require(['qlik', 'enigma', 'autogenerated/qix/engine-api'], function(qlik, enigma, schema) {
|
|
//The base config with all details filled in
|
|
var config = {
|
|
schema: schema,
|
|
appId: "My Demo App.qvf",
|
|
session: {
|
|
host: "qseow.jprdonnelly.com",
|
|
port: 443,
|
|
prefix: "",
|
|
unsecure: true,
|
|
},
|
|
}
|
|
//Now that we have a config, use that to connect to the //QIX service.
|
|
enigma.getService("qix", config).then(function(qlik) {
|
|
qlik.global.openApp(config.appId)
|
|
//Open App
|
|
qlik.global.openApp(config.appId).then(function(app) {
|
|
//Create SessionObject for FieldList
|
|
app.createSessionObject({
|
|
qFieldListDef: {
|
|
qShowSystem: false,
|
|
qShowHidden: false,
|
|
qShowSrcTables: true,
|
|
qShowSemantic: true,
|
|
qShowDerivedFields: true
|
|
},
|
|
qInfo: {
|
|
qId: "FieldList",
|
|
qType: "FieldList"
|
|
}
|
|
}).then(function(list) {
|
|
return list.getLayout();
|
|
}).then(function(listLayout) {
|
|
return listLayout.qFieldList.qItems;
|
|
}).then(function(fieldItems) {
|
|
console.log(fieldItems)
|
|
});
|
|
})
|
|
})
|
|
})
|
|
}
|
|
})
|