1 Reply Latest reply on Dec 27, 2017 12:06 PM by Patrick A Van Der Hyde

    Making code dynamic

    Nitin Uppal

      Need help to update below code and make it dynamic so that it is not filter dependent "Gender", when value is called it filters that using getData():

       

      sheet.applyFilterAsync("Gender", ["Male", "Female"], "REPLACE")

      .then(function () {

         return getDataAsync(sheet, "Gender", "Male", options)

        .then(function (data) {

      console.log(data.length);

      });

      });

       

      it should be something like, value called should be dynamic and not static as in above code "Gender":

       

      sheet.applyFilterAsync("Value Called", "REPLACE")

      .then(function () {

         return getDataAsync(sheet, "Gender", "Male", options)

        .then(function (data) {

      console.log(data.length);

      });

      });