How to select the relative path outside of the appsheet folder?

I have to save my pdf files that I create using automation in a folder outside of appsheet folder in google drive.

My Appsheet folder from the root of the google drive

appsheet/data/myApp

Folder Where I want to store the files again from the root of the google drive

operations/production/jobcards

I tried various options like below but they all create folders inside myApp Folder

…/operations/production/jobcards
…/…/operations/production/jobcards

Any help ?

@Steve - I got an edit notification of the post but dont see any changes.

Try keeping the Google sheet (DB) in desired folder and try again.

I changed the category to #appsheet-automation.

1 Like

Ok. Can you help me sort this one out ?

We only support relative paths.

Path relative to the app and not the data source (the google sheet). Am I right ?

In that case, Is it ok to move the app to any desired folder in google drive other than the default location (appsheet folder in the root of the google drive) ?

You can only save files under the app’s folder; you cannot save files outside the app’s folder tree.

1 Like

Use the tricks from @Aleksi , hitting Shift+Z to generate the short-cut from one folder locating outside default appsheet app folder to create shot cut inside default folder, then set the path to that one.

3 Likes

Shift+Z = Old “Add to my Drive”, which is not the same than the new one, called “Add shortcut to Drive”.

3 Likes

But the app is able to read the files from outside the appsheet folder.

My Product table has an image column , where I provide the path to my images that are located in folder that is relative to my sheet (datasource) and not the app folder and it renders the images perfectly in the views.

So is it like, it can read the files from anywhere in the Google Drive but when it comes to saving, it saves only in the appsheet folder ?

So Do you mean that trick is not working now with the new one ?

It works with the “Add to my Drive”. Both are still valid features, you just need to use the old one.

2 Likes

Ok. Let me check

Hello Aleksi,

I tried but this doesnt seem working . This is what I did

My shortcut is here

mydrive/operations/production/data/jobcards(shortcut)/file.pdf

(My data source is also in the same data folder)

Actual folder to the files is here

appsheet/data/myapp/jobcards/file.pdf

And this is what I have given as my column value

jobcards/file.pdf

I really need this solution as a lot of my app depends on this. Would appreciate any help. If need more clarifications, can provide.

I would use an appscript on the sheet that fires with a trigger on update.
The appscript could then for example use the cell values or just look in the apps jobcards folder for new pdfs and copy them to the external folder.

This sounds good but I am not familiar with appscript.

With what @Aleksi and @tsuji_koichi has suggested, what i have done should work but seem I am going wrong somewhere.