def setFilter(self, columnName, value):
     try:
         filter = [{
             "globalFieldName": t["globalFieldName"],
             "index": t["values"].index(value) + t["ordinal"]
         } for t in self.getFilters() if t["column"] == columnName]
         if len(filter) == 0:
             self._scraper.logger.error(f"column {columnName} not found")
             return tableauscraper.TableauWorkbook(scraper=self._scraper,
                                                   originalData={},
                                                   originalInfo={},
                                                   data=[])
         r = tableauscraper.api.filter(self._scraper, self.name,
                                       filter[0]["globalFieldName"],
                                       [filter[0]["index"]])
         self.updateFullData(r)
         return tableauscraper.dashboard.getWorksheetsCmdResponse(
             self._scraper, r)
     except ValueError as e:
         self._scraper.logger.error(str(e))
         return tableauscraper.TableauWorkbook(scraper=self._scraper,
                                               originalData={},
                                               originalInfo={},
                                               data=[])
     except tableauscraper.api.APIResponseException as e:
         self._scraper.logger.error(str(e))
         return tableauscraper.TableauWorkbook(scraper=self._scraper,
                                               originalData={},
                                               originalInfo={},
                                               data=[])
    def select(self, column, value):
        values = self.getSelectableValues(column)
        tupleItems = self.getTupleIds()
        try:

            indexedByTuple = False
            for tupleItem in tupleItems:
                if len(tupleItem) >= len(values):
                    index = values.index(value)
                    index = tupleItem[index]
                    indexedByTuple = True
                    break
            if not indexedByTuple:
                index = values.index(value)
                index = index + 1
            r = tableauscraper.api.select(self._scraper, self.name, [index])
            self.updateFullData(r)
            return tableauscraper.dashboard.getWorksheetsCmdResponse(
                self._scraper, r)
        except ValueError as e:
            self._scraper.logger.error(str(e))
            return tableauscraper.TableauWorkbook(scraper=self._scraper,
                                                  originalData={},
                                                  originalInfo={},
                                                  data=[])