Importrange

@BlakeACroft Hard to help when you refer to the message you are receiving as “something like that” !

I suggest you take a look at some Googles scripting tutorials and get the basics down before you dive into the deep end with some sample code that you get from a board like this.

This series is pretty good: https://www.youtube.com/playlist?list=PLv9Pf9aNgemv62NNC5bXLR0CzeaIj5bcw

1 Like

I got a “Illegal character. (line 11, file “Code”)” error

Put double quotes instead of simple quote to the getSheetByName function.

1 Like

@Christophe_HK @BlakeACroft It is not the single quote that is giving the error. I missed the Illegal characters around the “L2” and “L3” when I copy, pasted and fixed the original code. For some reason this forum software replaces all the single and double quotes with some other character that looks like single and double quotes but is not the same ascii values I guess. Javascript, which is what Google Script is based on allows either single for double quotes to designate a string.

1 Like

Thanks for this guys. I will investigate implementing on my apps that use importfeed.

I don’t understand why my PRO apps are not refreshing the today function. My app.native.zone before would show today’s moon when I visited from browser. Now I have to open the spreadsheet for it to be updated in the app. @david , did this feature get cut from PRO apps? Or should do I update my method?

Have you set the background refresh for your pro apps?

https://docs.glideapps.com/all/guides/quick-starts/getting-started/background-refresh#background-refresh-pro

They are working in solving ia bug in importrange refreshing

1 Like

IMPORTRANGE has always had this refresh behavior and we’ve always documented it: https://docs.glideapps.com/all/reference/using-sheets/importrange

We created background refresh as a Pro feature to work around this.

Thank you! Works perfect.

1 Like

Hi David

Did you get this done. I need some help as I created a script to look for onedit changes and it only works when I physically open the sheet and click on the cells. In particular my sheet uses checkboxs when events happen and then the script looks for these true / false columns and creates a date and time in the next field to the right. My issue is that it doesnt seem to work when changes are made in my app but it does work when I manually change the cells by clicking on the checkboxs…
Any ideas would be appreciated.
Thanks

Yes, background refresh has been available for awhile…but that’s not your problem. The only trigger that works with changes from Glide is the onChange event, the time trigger also works if you want to run the script every few minutes instead. OnEdit only works with changes made within the sheet itself.

Hi Jeff, I am developing an app which requires multiple checkboxs to be activated and when they change they need a date time stamp in the next 2 fields, the first time stamp for the initial change and the second timestamp on any further changes (last submitted times) I have 6 of these on a posts page and therefore can only use the time stamp for the submission of the post itself. The other 5 checkboxs need a unique time stamp when they are activated or changed for the first time. These checkboxs are being run from the edit screen within the glide app. l have used scripts calling the onEdit function however they only work when I edit the sheet and not when glide posts to the sheet. Can you help me find a solution that works?

@Johnny onEdit isn’t going to work. Like I mentioned, you need to use the onChange trigger instead. See if any of this helps.

1 Like

Thanks Jeff

1 Like

I want to share an experience with the Importrange

You will need to ensure not to add a row ID because its useless if you are going to use filter or query to filter out a certain data to limit the amount of data that you need to import and this to make sure to speed up the sheet data.

Don’t use Glide automated ROW ID because it will count the empty cells and rows