2 Replies Latest reply: Apr 26, 2017 8:51 AM by Diogo Henrique Silva guilhen RSS

    select multiple Fields in Qlik Sense Mashup

    Lital Rokach

      Hi All,

      I'm trying to build a trigger in mashup which select different values in fields

      when i try to select more then one field it ignores all of selections.

       


      app.clearAll();

      app.field('Priority').selectValues([{qText: "High"},{qText:"Low"}], true, true);

      app.field('Cases Open/Closed').selectValues([{qText: "Closed Cases"}], true, true);

      each one of them works separately but not together.

      Help will be appreciated,

      Lital

       

       

        • Re: select multiple Fields in Qlik Sense Mashup
          Diogo Henrique Silva guilhen

          i'm trying to get this too..... anyone could help us?

           

          Im reach here:

           

          var formatter = new Intl.DateTimeFormat("pt-BR", { month: "short" }),

            month1 = formatter.format(new Date()) ;

            var monthNames = ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'];

            var posicao = monthNames.indexOf(month1);

            var mesesSelecionados = monthNames.slice(posicao, 12);

           

           

            var mesesSelecionadosJson = {};

            var arrayteste=[];

            for ( i =0 ; i< mesesSelecionados.length; i++ ){

            var teste = mesesSelecionados[i].toString();

            mesesSelecionadosJson  =  JSON.stringify({ 'Mes':   mesesSelecionados[i]   } );

            mesesSelecionadosJson = mesesSelecionadosJson.toString().replace(/"/g,"");

           

            arrayteste.push(mesesSelecionadosJson );

           

             console.log([arrayteste.toString()]);

            console.log(mesesSelecionadosJson );

            };

          • Re: select multiple Fields in Qlik Sense Mashup
            Diogo Henrique Silva guilhen

            I GOT IT!

             

            Follow :

             

            var formatter = new Intl.DateTimeFormat("pt-BR", { month: "short" }),

              month1 = formatter.format(new Date()) ;

              var monthNames = ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'];

              var posicao = monthNames.indexOf(month1);

              var mesesSelecionados = monthNames.slice(posicao, 12);

             

            app1.field('[messtr]').selectValues( mesesSelecionados, true );

             

             

             

            I just use a simple array!!!!! and select another dimension.