Skip to content

Instantly share code, notes, and snippets.

@erikwett
Last active April 26, 2018 10:06
Show Gist options
  • Save erikwett/864fc61e4f794c58e181d54c16da8157 to your computer and use it in GitHub Desktop.
Save erikwett/864fc61e4f794c58e181d54c16da8157 to your computer and use it in GitHub Desktop.
Alternate state field as a dropdown
state: {
ref: "qHyperCubeDef.qStateName",
label: "State",
type: "string",
defaultValue: "$",
component: "dropdown",
options: function () {
return qlik.currApp(this).getAppLayout().then(function (a) {
return a.layout.qStateNames.concat('$').map(function (state) {
return {
value: state,
label: state
};
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment