Hello all! Quick question about sourcing dat...

(Miranda Lubarsky) #1

Hello all!

Quick question about sourcing data for you.

If I have a spreadsheet on drive entitled “Timesheets 2018” and I want to update it to “Timesheet 2019” for us in the new year, is there any way to update the name in drive without totally messing up the app and having to re-build the part of the app that is based on this spreadsheet?

I really don’t want to have to do that because it took FOREVER.

Your advice is appreciated! Best, Miranda

(Steven Coile) #2

You can change the name of the file without much trouble. You’d only have to update the AppSheet table configuration (in Data > Tables in the app editor) to use the new Source Path.

Similarly, you can change the name of the worksheet, then update the table configuration accordingly (Worksheet Name/Qualifier, also in Data > Tables).

You can do either or both of the above without needing to change anything else in your app configuration.

(Miranda Lubarsky) #3

+Steve Coile Ok, so the order that I do it in doesn’t matter?

Sorry, just SUPER nervous about changing this because it would take SO LONG to re-do if I messed it up.

(Steven Coile) #4

Change the file name in Google Drive and the worksheet name in the Google Sheet shortly before making changes in AppSheet.

You can change both the file name and worksheet name in AppSheet at the same time.

In the period of time between making the changes to the Google Sheet and making the changes to AppSheet your users may experience problems with the app. Best to make the changes quickly and when users are less likely to be using the app. A good idea: you could also disable the app for the duration to prevent use and potential confusion.

Consider recording the app version number before saving the changes in case you want to revert. I wouldn’t expect you’d need to revert. You can also create a named version of your spreadsheet file (File > Version History > Create named version) should you want to revert it, as well.

(Reza Raoofi) #5

If you change the spreadsheet file’s name in Google Drive, your app will continue working, even though it will still display the old spreadsheet name as Source Path in table definition page; that is because AppSheet works with Doc ID which is independent from spreadsheet’s name you see in Google Drive.

Once you regenerate that table, AppSheet will automatically pick up the new spreadsheet name.

However when it comes to the Sheet name (tab name) inside a spreadsheet file, or in other words the Worksheet Name/Qualifier that Steve referred to, changing names could break your app, and you will have to manually change it in table definition too.

(Miranda Lubarsky) #6

@RezaRaoofi +Steve Coile Ok, yes, I am mostly talking about changing the names of the tabs within a spreadsheet, but also the main doc.

I guess my concern is this - I want to avoid having to regenerate the table because I am essentially clearing all the information out of the document, and I am afraid that all of my manual work to change things in Data>Columns with expressions, valid-ifs, etc. will be lost if I regenerate the document and all of that input is gone.

Of course the headers will all be there, but I am superstitious I guess.

I have been deleting information line by line through the app thus far to ensure that I don’t have to regenerate and loose all that work, but obviously I would rather just delete on google drive in one big block and regenerate, as long as I won’t loose that information.

Thoughts?

(Reza Raoofi) #7

No, regenerate won’t impact Valid-ifs or other settings you have in your column structure; in order to make it seamless, I recommend to first open your app in app editor, then copy existing sheets as new sheets with new names in the same spreadsheet, then regenerate your table, so the table definition would populate the new list of sheets which contains the new sheets names, then go to Data > Tables; open table definition and change Worksheet Name/Qualifier (sheet name) accordingly, and save.

If you want to have peace of mind, make a copy of your app and its data, and test what I said on the copied app/spreadsheet; see for yourself that your column structure will be intact. If all is satisfactory, then apply the same process to your live app.

Also as Steve mentioned having an old version of spreadsheet and also the old version of your app handy prior to change is a safe approach should something goes wrong and you need to restore.