I am wondering if its possible to dynamically change the folder used for the attachments based on date. In other words, we send out bills clients daily, and I would love to have a different folder in drive each day with the bills. Can you have the filepath be dynamic?
Solved! Go to Solution.
If I have correctly understood your requirement, yes one can have dynamic folder path.
Appsheet can create a folder path on its own on a daily basis as you need.
You could name the folder path something like below. It will create a new folder such as โByDate-10022020โ with changing date daily , under main folder โClientBillsโ in the example below. You could suitably change the folder names etc.
CONCATENATE(โClientBills/ByDate-โ, TEXT(TODAY(), โMMDDYYYYโ))
My latest testing showed that one can name the expression without enclosing it in << >> parenthesis as mentioned in article.
If I have correctly understood your requirement, yes one can have dynamic folder path.
Appsheet can create a folder path on its own on a daily basis as you need.
You could name the folder path something like below. It will create a new folder such as โByDate-10022020โ with changing date daily , under main folder โClientBillsโ in the example below. You could suitably change the folder names etc.
CONCATENATE(โClientBills/ByDate-โ, TEXT(TODAY(), โMMDDYYYYโ))
My latest testing showed that one can name the expression without enclosing it in << >> parenthesis as mentioned in article.
Hey! I canโt find the right way to explain it to them: โHey! Whatโs highlighted is the file name, and before that are the folders!โ Luckily, Iโm bald, or I wouldโve pulled all my hair out! ๐
โ
Thanks! Works perfectly
You are welcome . Nice to know it works. You may wish to take a look at the following point, just in case it helps.
If there is a daily folder created , there will be many daily folders in a year ( max 365 but depending on working days , there could be 250 at least) . In couple of years , there will be many folders under one single parent folder and a bit difficult to search a specific day folder.
So it may be better approach to create a folder structure something like below
CONCATENATE(โClientBills/โ, TEXT(TODAY(), โMMM - YYโ), โ/โ, "ByDate - ", TEXT(TODAY(), โMMDDYYYYโ))
The above expression will have a monthly folder in the format Mar 20 , Sep 21 etc. under main folder and followed by 28 to 31 daily folders beneath.
You could of course have the best variation in the structure that suits your requirement. Hope this helps.
That what i search thanks will try.
Can you give me the formula for saving file automaticly by actual year folderโs name please
Maybe something like
CONCATENATE(โYear - โ, TEXT(TODAY(), โYYYYโ) )
Work great thanks
i've just tried this formula and worked,
For example
Create a folder in Default app folder = AppSheet Tutorial
create a Folder together with you Google Sheet data
Then, Create Bot
run data action
create formula:
CONCATENATE("/APSHEET TUTORIAL/create file/",[Column Name 1]&"-"&[Column Name 2]&"-"&[ID]&"-"&[GENERATE PDF],".pdf")
User | Count |
---|---|
18 | |
10 | |
8 | |
6 | |
5 |