Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to hide an option in my HTML menu based on a variable in Qlik Sense.
My variable name is Dashboard and it contains either an Y or an N. If it is a Y i want to show a specific page within my Dashboard.
I tried this: But it doesn't work. I call an other variable above this one and that one works. But i can't figure out why this one doesn't work.
Can you help me?
Thanks,
Kind regards,
Isabelle
app.createList({ "qFrequencyMode": "N", "qDef": { "qFieldDefs": ["DASHBOARD"]},
"qInitialDataFetch": [{"qHeight": 20,
"qWidth": 1}], "qLibraryId": null
}, function (reply) {
var dashboard = value[0].qText;
if (dashboard == 'Y')
{
$("#menu-internet").hide();
}
else
{
$("#menu-internet").show();
} });
Hi Isabelle,
I think you should try createGenericObject instead. Would be something like this:
app.createGenericObject( {
dashboard: {
qStringExpression: "=DASHBOARD"
}
}, function ( reply){
if(reply.dashboard === 'Y'){
.....
} else {
}
});
I haven't actually tested this, so there could be syntax errors etc.
Hope this helps
Erik
Have you actually console.logged() the reply and checked that reply.dashboard returns a value?