Google Sheet Read Data from new column; No error, but empty when {{item.columnName}}

Hi there,

I'm new to Retool. I'm trying to display more content to my app so I added several new columns to my google sheet. One of the new column names is called "Usage", I want to be able to display the content in the rows under "Usage".

I tried to check the googlesheet query which is working fine, it has "Usage" returned, and it looks like this
image
image

The code I wrote in order to access the data in this googlesheet is provided below, and I display the content i need by using {{ item.columnName}}.

The problem i am encountering is it displays correctly like before if I go {{item.Service}}, but if I {{item.Usage}} where Usage is one of the newly added columns, it does not give error but display nothing.

Any help would be greatly appreciated!

function filterListBySearch(list, searchInput) {
if (!searchInput) {
return list;
}

return list.filter(function(item) {
return Object.values(item).some(function(value) {
return String(value).toLowerCase().includes(searchInput.toLowerCase());
});
});
}

return filterListBySearch({{ googleServices.data }}, {{ searchGoogle.value }});

I don't think you want the {{ }} in the last part of the code:

function filterListBySearch(list, searchInput) {
  if (!searchInput) {
    return list;
  }

  return list.filter(function (item) {
    return Object.values(item).some(function (value) {
      return String(value).toLowerCase().includes(searchInput.toLowerCase());
    });
  });
}

return filterListBySearch(googleServices.data, searchGoogle.value);
;

Hi, I tried to get rid of {{}} in the last part it gives me error. The problem I am facing is if leaving it as {{}} will allow me display content in Service column with {{item.Service}} correctly.

But if I go {{item.Usage}} it won't display the content under Usage column.

Can you show the setup of the Usage column in the table? Is there maybe a white space or something odd in the spreadsheet field name? Pretty weird if the code works for any other column but this particular one. Did the other new columns you used work?

Hi John,

None of the new columns worked. "Service" column is one of the old ones. i tried re-runing the query too.

No worries I got it resolved, it's the referencing issue with the Google Sheet! Thanks for the help John!