Hi Appsheet teams,
I have been using this expression ever since PDF is not showing in app. Is there any way to show the last created PDF in app? Here the expression is also working but I am not able to access it from appsheet in the location where the PDF is being saved.
Using save pdf expression.
CONCATENATE(
YEAR(TODAY()), “/”,
RIGHT(CONCATENATE(“00”, MONTH(TODAY())), 2), “/”
)
But this location to pdf is not shown in the appsheet. Tell me how I can fix it.
I solve this problem builging an URL for each required file generated with a both.
To build the URL I used a simple Script.
function obtenerIdPorNombre(nombre) {
var archivos = DriveApp.getFilesByName(nombre);
while (archivos.hasNext()) {
var archivo = archivos.next();
return archivo.getId();
};
The script is just to get the File ID, searching in drive by name and that will become in an output data [FileID]. And then, in a virtual colum build the URL:
“https://docs.google.com/spreadsheets/d/”&[FileID]
I did’n build the URL directly in the Script in order to show the “OpenURL” action just after Script output was written in my table.
Hi @MiguelPilo
Following the expression I have given, I create a new folder every month. Will the script you have given me give the result of automatically picking the current months folder.
If the name of file is unique, YES. So, use some name nomenclature to achive this.
But I want appsheet Expression.
Just Disable Timestamp and use CONCATENATE() function to write a file name suitable for you, but include the key column or any other code to achieve a unique name: CONCATENATE([Key],“Suitable name”,“.pdf”)