Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ift_isabelle
Partner - Creator III
Partner - Creator III

Qlik Mashup - Hide an HTML based on a variable in Qlik Sense

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();

                                 } });

2 Replies
ErikWetterberg

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

Not applicable

Have you actually console.logged()  the reply and checked that reply.dashboard returns a value?