Users of this spreadsheet can select which employees to email by checking the checkbox in column A. In the screencast below, you'll see a simple implementation of this idea. They can also be used to select the rows that should be processed by a Google Apps Script script. They can be used to mark tasks in a to-do list as done. Checkboxes are versatile and can be used for a variety of use cases. In this tutorial, you will learn how to work with checkboxes in Google Sheets using Google Apps Script. what we don't), llGetNotecardLine definitely feels asynchronous, with your script process being sequential, and this seems to be the terminology adopted by the LL's also.Working with Checkboxes in Google Sheets using Google Apps Script ☑️ If you take a step down, then it's all asynchronous because the focus shifts to considering the script overrunning it's time slice, the whole scheduling thing, etc…īut from a normal scripters point of view (ie. It is of course also a question of what layer you're looking at, though If you take a step up the ladder, it's all synchronous because your script runs it's higher level process one step at a time regardless. Also, your script can do plenty of other things while it waits for the "real data" to be returned, which wouldn't be possible if it was synchronous. following a sequence, but possibly unpredictable in time. What you're describing there, is exactly sequential behaviour - ordered, ie. Two events can be synchronous, even if they happen otherwise at random. "some time in the very near future, hopefully" response). Synchronicity usually relates to predictability in time (in LSL terms, immediate response, vs. I'm inclined to go with the term sequential, also. I think everybody here has understood the distinction despite any hard definitions. Kinda like the await keyword in Javascript, when you want to wait for an async function to actually finish before executing something else. Nothing is done until the real data is returned, and everything is done in the same deterministic sequence. While the function is async, the traditional process is synchronous. I thought about it as I was writing my post, but I think synchronous is correct. Requesting multiple lines would need you to build a list of the handles instead of just keeping track of a single handle, and if you're not storing them, then you're probably not guaranteed to keep track of the notecard line order, which probably isn't ideal.Īlternatively, maybe you want to externalize the dataserver event handling to another script to save memory, but then you'll need to communicate that request handle to the other script in some manner, and if I had to guess (without testing) that's going to be hard because of the built-in delay on llGetNotecardLine - by the time you can know the key to send it, the dataserver event on the other script might have already fired, unlike the single-script case where you can be sure the event isn't going to interrupt the currently running one. I have a hard time thinking of particularly great reasons for putting in multiple read requests at the same time though, barring a basic "read multiple notecards sequentially at the same time" situation - get them all started at the same time, process as usual. Dunno if I'd call the traditonal way "synchronous" since the calls are still fulfilled at a later date, I'd go with "sequential".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |