Manually Refreshing Data from App

I’m trying to think of a creative way on how to manually trigger a data sync from within a free version of an app and was wondering if some Glide experts could help validate my solution.

I have data that is being pulled into my google sheets (importHTML() formula) from websites and when data is updated from the website, my sheet receives the data. Only problem is that i don’t think that sort of action is recognized by Glide to sync right away.

A possible workaround I was thinking is to create a button on my App to ‘Fresh’ and grab data. The button would have a glide action attached to it and create a new row in a different table and add it to the google sheets. Then create a script within google sheets that when there is a new row, wait let’s say 1 minute then delete the row. This way the app isn’t using unnecessary rows just for refreshes.

Now my assumption is: Adding a new row will invoke Glide to pull any updates into the glide tables.

Does anyone know if this would work?

Yes I think you’re right on this. An external update (not from Glide) is not gonna tell Glide to update it right away.

You’re also right, but I think you can just use a set column to set a value like current timestamp to a certain row/cell in your data.

2 Likes

Thank you @ThinhDinh , I was able to create a two columns (text and date) and just update text within it from the glide action and then have a google script update it back to another value and add a new date.

seems to be working well! Appreciate the input

Instead of relying on a script, you should be able to set the current date/time from glide. That should be enough to trigger glide to look for sheet updates. Just one column to hold a date (set by a glide action) instead of using two columns and a google script.

Here is how I hacked a solution to make a button update the app.
I have an RSVP list in a Google sheet and use an importrange to tie that info to a sheet in my app worksheet. I created a number column in column A called “refresh” and started the importrange in column B.
Then I created a button in the app to refresh the data and added a notification and a sound. This increments the “refresh” column and causes the app to reload. There are only two of us that use this app/button to track stats and rsvps so not a consumer solution, but it does the job of refreshing the app by clicking a button. It does take about 10 seconds to see the update.

7 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.