Hi, I have made a home delivery app for a small local pizzeria. Now I am wondering if there is anyway that I can only make the app functioning only during the opening hours of the pizzeria. If someone places an order at 2.00 am that order won’t be picked up and dealt with, and it would “contaminate” the Sheet and the app with unnecessary orders. Thanks in advance for any ideas!
It would need to be a pro app to have background app refresh, but you could place a Now() formula in the sheet somewhere to grab current time. Create a formula that checks if it’s between a certain time range and output true or false. Use this boolean value to show/hide the order button.
Thanks Robert! Will give that a try.
I tried implementing the suggested formula to check if an order is placed within a certain timeframe. It works fine in the cell were I placed the formula, but it should automatically do this for all new cells that are generated in this column and that does not work. I tried using the arrayformula function, but I think I made a mistake somewhere. Anybody have a tip for me how to get this working? Here is a screenprint of the current formula:
Assuming column A stores the hour of ordering so that you won’t have to get HOUR involved in the nested formula, I got it work with the formula in the image.
Update: I random some timestamps, got an arrayformula for the hour column.
Just a thought, but if you can build the current date and opening time in one column, and the current date and closing time in another column as true datetimes, then I would think you could build visibility around buy button within Glide to only show it if the opening datetime is on or after now and the closing datetime is on or before now. This way you would only have to worry about the datetime in the sheet updating once a day and Glide would handle the datetime comparison.
Thanks for this suggestion, I will try to set it up like that.
I followed your recommendation to use Now() within Data Editor and everything was fine until the deadline is reached … Glide doesn’t fire the Now() event so, the condition is not evaluated.
Here my screenshots can give an idea:
and it’s how the logic was configured:
and when the time is reached, nothing changes
Is it a bug or I’m doing anything wrong? If I modify the OpenTime value manually, the logic works fine but in an automatic mode, nothing happens!
May you test it and tell me if I’m crazy or not??
Gracias y feliz domingo!
Working on pro app? The free tier doesn’t update automatically - only the pro does
I supposed it and tested it with my Pro App and the result was the same!
no way @Krivo, nothing happens
@gvalero pls reinstall your computer - and afterwards if that doesn’t work pls reinstall the internet
my plan C will be to buy a new phone as well!
That made me crack up, good one @Krivo
now everything is working!!
Glad you don’t have to reinstall your internet