Excellent and very useful. I had the following problem / solution let filterData=data.filter(row=>row[0].toUpperCase().match(searchText.value.toUpperCase())) had to become let filterData=data.filter(row=>String(row[0]).toUpperCase().match(searchText.value.toUpperCase())) As row[0] was not considered a string and threw the following: row[0].match is not a function
Thank you! There should be many ways of handling it One way is this: Creat e adiv above the table, like this "There are no results" Then in your javascript you are going to hide it initially, and then if there are no rows in the data, it will show it again, like this google.script.run.withSuccessHandler(function(data){ let tableBody=document.getElementById("table-body") document.getElementById("no-results").classList.add("d-none") //INCLUDE THIS NEW LINE if(data.length==0) document.getElementById("no-results").classList.remove("d-none") //INCLUDE THIS NEW LINE Finally, in your search function you may do the same, but with the filtered data function search(){ google.script.run.withSuccessHandler(function(data){ document.getElementById("no-results").classList.add("d-none") //INCLUDE THIS NEW LINE let searchText=document.getElementById("search-box") console.log(searchText.value) let tableBody=document.getElementById("table-body") tableBody.innerHTML="" let filterData=data.filter(row=>row[0].toUpperCase().match(searchText.value.toUpperCase()) || row[1].toUpperCase().match(searchText.value.toUpperCase()) || row[2].toUpperCase().match(searchText.value.toUpperCase())) if(filterData.length==0) document.getElementById("no-results").classList.remove("d-none") //INCLUDE THIS NEW LINE I hope it is useful Regards!
HOW TO DO THIS??? Login Multi User Category to Displaying Multiple Sheets ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2mf9LREdEnU.html&ab_channel=ConsulthinkProgrammer