# Automatic Refresh after App is Idle?

**URL:** <https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586>\
**Category:** Ask for Help\
**Created:** [October 1, 2020, 1:00am UTC](https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586 "2020-10-01T01:00:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaybuster](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jaybuster/32/14116_2.png) [@jaybuster](https://community.glideapps.com/u/jaybuster)\
**Post date:** [October 1, 2020, 1:00am UTC](https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586/1 "2020-10-01T01:00:40Z")

</div>

Hello! I’m building a searchable tenant directory for a building’s lobby.

A visitor performs a search looking for a specific tenant. Once the visitor gets the search result the visitor then walks away to the tenant’s office. This leaves the tablet’s display showing the old search result, which leaves new visitors looking at “garbage”.

Is there any timer that could perform a refresh to the app after a search, that will result in the screen automatically returning to the home page?

Thank you. Jay

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [October 1, 2020, 1:06am UTC](https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586/2 "2020-10-01T01:06:01Z")

</div>

I wonder if visibility using a now + “x” minutes might work. You’d definitely need a pro app for background refresh, then set up a way for tabs or components to be visible/hidden based on a math column that uses a now + x minutes formula.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 1, 2020, 4:22am UTC](https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586/3 "2020-10-01T04:22:32Z")

</div>

Building on what Kyle has said above, I think you can have a setup like this, but it involves a script:

- Have a text entry that writes to your sheet for search, instead of using the native search.

- Build your search list return using “is included in”.

- Have a script that writes the timestamp to a cell when the “search” cell is edited.

- Have a further column that serves as your “reset column”. Let’s say you want to reset it 2 minutes when app is idle. Add 2 minutes to the timestamp cell above, tell the script to clear the search cell when the “now” time surpasses that reset time.

All in all, very complex structure to build.

---

<div class="post-metadata">

**Author:** ![jaybuster](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jaybuster/32/14116_2.png) [@jaybuster](https://community.glideapps.com/u/jaybuster)\
**Post date:** [October 1, 2020, 8:58pm UTC](https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586/4 "2020-10-01T20:58:58Z")

</div>

shchc and ThinhDinh - Thank you for your ideas. Unfortunately, I’m a newbie so this is outside of my limited knowledge. If I were going to continue to work at this, where would the script go? In the Google spreadsheet? Thank you. Jay

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 10, 2020, 3:23pm UTC](https://community.glideapps.com/t/automatic-refresh-after-app-is-idle/16586/5 "2020-11-10T15:23:38Z")

</div>

There is a much simpler way…Every browser allows for idle callbacks. If you are wanting this in your app and you do not intend to use it in a browser then use an API, google has one right here.

> **[chrome.idle - Google Chrome](https://developer.chrome.com/apps/idle)**
