Answer the question
In order to leave comments, you need to log in
How to implement continuous data transfer from table to sidebar?
There was a need in the sidebar of the table, to transfer the object that is formed in GAS, with the next selection of a new active cell. Acceptance by the sidebar of the object should happen automatically. An example using events in the sidebar (on a button click or mouse over) is not suitable. If my task can be implemented in pure js, please help!
Answer the question
In order to leave comments, you need to log in
Try to attach a function to the onFocus event that takes data, forwards it to your object and sets the value from the object to the sidebar.
This is best done via a recursive function call in the sidebar code itself:
something like this
function getData ( data ) {
// Тут обработка полученных данных
// Тут можно реализовать условие прекращение получения данных
// Повторный запрос данных
google.script.run
.withSuccessHandler( getData ) // Название текущей функции
.getData() // Название функции на сервере
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question