Is there a way to pass a value back to a HTML page while a server side function is running?
In the past when I was using the UI service, early in the function I would just create a label in the UI like:
app.createLabel('Working, hang on!');
And it would appear while the script was running, letting them know the script was running. When it got to certain parts of the script I would then be able to update/create a new message like:
app.createLabel('Halfway there, hold on.');
Or
app.createLabel('Fetched values, processing them');
etc., to tell them where we are if the script was running for a long time. An added bonus was that it could also update them on what direction the script was taking, so for example if a room booking script found that the first room was unavailable, it could pass a message back such as:
app.createLabel('First room was busy, checking other rooms');
And so on, and so forth.
Is there a way to do this with the HTML service? It seems my only options are success and failure handlers updating the HTML page when the function is complete, which don't seem to be what I want, as it's not a 'Real Time' message.