This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dimension : { | |
type : "items", | |
label : "Dimensions", | |
ref : "qListObjectDef", | |
min : 1, | |
max : 1, | |
items : { | |
label : { | |
type : "string", | |
ref : "qListObjectDef.qDef.qFieldLabels.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initialProperties : { | |
qListObjectDef : { | |
qShowAlternatives : true, | |
qFrequencyMode : "V", | |
qSortCriterias : { | |
qSortByState : 1 | |
}, | |
qInitialDataFetch : [{ | |
qWidth : 2, | |
qHeight : 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//created from the mashup editor | |
app.createCube({ | |
"qInitialDataFetch": [ | |
{ | |
"qHeight": 20, | |
"qWidth": 2 | |
} | |
], | |
"qDimensions": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.createCube( { | |
"qInitialDataFetch": [ | |
{ | |
"qHeight": 400, | |
"qWidth": 8 | |
} | |
], | |
"qDimensions": [ | |
{ "qDef": {"qFieldDefs": ["CaseNumber"]} }, | |
{ "qDef": {"qFieldDefs": ["Status"]} }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
type: "items", | |
component: "accordion", | |
items: { | |
dimensions: { | |
uses: "dimensions", | |
min: 1, | |
max: 1 | |
}, | |
measures: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initialProperties : { | |
version: 1.0, | |
qHyperCubeDef : { | |
qDimensions : [], | |
qMeasures : [], | |
qInitialDataFetch : [{ | |
qWidth : 2, | |
qHeight : 50 | |
}] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//check if we are in personal mode(desktop) or not | |
var global = qlik.getGlobal( config ), isPersonalMode; | |
global.isPersonalMode( function ( reply ) { | |
isPersonalMode = reply.qReturn; | |
} ); | |
/*..*/ | |
if ( isPersonalMode ) { | |
app.doReload().then( function () { | |
app.doSave(); | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FieldList ( app ) { | |
/*....*/ | |
app.getList( 'CurrentSelections', function ( reply ) { | |
me.selections = reply.qSelectionObject.qSelections; | |
//render since selections have changed | |
me.render(); | |
//use qBackCount and qForwardCount to enable/disable back and forward buttons | |
$( "[data-qcmd='back']" ).toggleClass( 'disabled', reply.qSelectionObject.qBackCount < 1 ); | |
$( "[data-qcmd='forward']" ).toggleClass( 'disabled', reply.qSelectionObject.qForwardCount < 1 ); | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reOrder ( vis, sortOrder, col ) { | |
// set the new column first in the new sortorder array | |
var newOrder = [col]; | |
//append all other columns from the current sort order | |
sortOrder.forEach( function ( val ) { | |
if ( val !== newOrder[0] ) { | |
newOrder.push( val ); | |
} | |
} ); | |
var patches = [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//getObject returns a promise, so we use the then method to get the model | |
app.getObject( tabid, id, options ).then( function ( model ) { | |
//save the model for future use | |
tabContainer.visualizations[tabid] = model; | |
//the title will be in the model | |
tabContainer.setTitle( model, tabid ); | |
//the Validated event will be triggered when there is new data | |
//use it to update the title | |
model.Validated.bind( function () { | |
tabContainer.setTitle( this, tabid ); |