I'm building a custom searching function for a Spreadsheet.
The spreadsheet has a sheet with a 1000+ rows, with data from different clients. It is used by people with very little knowledge of Google Sheets, so there's another sheet that is used to search and modify said data. It has a few list to select the clients and some other cells used to input data to filter and modifiy the registries. Below that, it has two 'buttons' (Drawings with scripts associated to them), one is used to search and the other to modifiy.
The problem I'm running in is that when I press either of the 'buttons' while still modifying a cell, the data obtained is the one that was previously in the cell, and not the one I'm inputing at the moment. I know that an easy solution is to press Enter or changing the focus of the cell before pressing the button, but I'm afraid people using it might not notice or forget it, and make the modifications to the wrong registry.
I tried changing the active cell through the script before obtaining the data, but it won't work. Calling the search/modify function from a custom UI Menu does work, but feels unnatural and unintuitive.
Is there a way to force the ongoing edit of the cell to finish (and effectively input the data into the cell value) with the button click?
(I hope I've explained myself, since English is not my primary language)