Save image to a file structure depending on logic

I have a table with a single image column. I want that image to be stored in the usual folder to start with. But if another column changes from TRUE to FALSE then I want it to save it (or move it) to a specified location, the folders of which don’t exist.

I’ve tried to look through various options and I can’t see for certain that this is possible. This seems to be the nearest to what I want - https://help.appsheet.com/en/articles/2848514-save-file-archiving.

The question is this even possible?

Solved Solved
0 15 1,572
1 ACCEPTED SOLUTION

15 REPLIES 15

I reckon appsheet would generate the folder even which does not exist at the time when the file is in attempt to be saved.

I supposed you would like to generate the folder dynamically with certain conditions, and direct the folders where the file is saved also dynamically.

Did you try to push the IF and/or Switch expression within workflow setting?

2X_3_34090fb4653d93f02bbce7b4cdf4f327d5d8cb5f.png

We should be able to use the expression here, so I believe you can dynamically change the relative folder path based on the value in the other field in the same row.

Yes I saw your post about creating folders. But I’m wondering if it could move the image too. I presume you’ve not come across this behaviour yet?

In my past cases, I m always using default folders, so never experienced to use the other custom folders before… but from technical prospective, I believed it would work.
M time, what do you mean “it could move the image too”?

@1minManager,

Could you please update if the other column would change status by opening the record by user changing its status? Also could you please elaborate a bit what you mean by “to a specified location, the folders of which don’t exist.

Hi @Suvrutt_Gurjar

So as an example we have…
Test[Location]
Test[Section]
Test[Image]
Test[Complete] Y/N Default=FALSE

So when initially created Test[Complete]=FALSE, Test[Location]=“House A” and Test[Section]=“Wiring Test” it saves the image to /appsheet/Test_Images/.jpg. Sometime later someone goes in and changes to Test[Complete]=TRUE. Then it needs to copy or move the image file to /appsheet/House A/Wiring Test/.jpg. Creating the folders if required.

Someone else is monitoring the later file structure so we don’t want them to see any images until they are marked as complete.

Hope this helps to explain a little more

Hi @1minManager,

Thank you. Got it. Looks like something like Google script and or workflows as @tsuji_koichi mentioned may be required to make it happen at the backend.

I tested it. And I share my observations just in case these help. It obviously works to put the image file in two different folders based on initial TRUE/FALSE status and it even creates a new folder path based on some other column values in the same record. I used File/Folder Path option in the image column by writing an expression to direct file to two different folders. However once the status toggles , it naturally does not change the folder of the stored file in Google drive to a new one.

Someone else in the community may of course have a better idea. I will also revert if something looks possible.

Do we have any scope in Appsheet to delete image files? Or to rename the actual files and references to them?

I dont think so unfortunately.

Nope to both.

Wouldn’t this work with a worklfow? Or can they only save files to folders?

There is no mechanism with appsheet for the moment to delete files on storage through the workflow.

Possible solution could be write GAS on backend.

I’m trying something simpler since it does not depend on logic but I am still struggling. All images in same column as well, but taken on different dates, and date is a column as well. Is there a way that appsheet would sort them in folders by the date?

Thanks a lot!

voce deve criar uma coluna [data] e usar a formula descrita acima . entao todas as fotos da mesma data iram ficar na mesma pasta

Obrigado @Henrique_Bk

Tem que ser no drive ou pode ser no dropbox?

Eu deletaria a coluna virtual que esta na imagem abaixo?

Muito obrigado!!!

isso faz com que crie uma nova pasta dentro do drive google .
e se uma imagem tiver o mesmo nome da coluna, ela irá para a mesma pasta, se a pasta nao existir ela irá criar uma nova.


Top Labels in this Space