Struggling to get an expression working that will create a sub-folder based on the user’s ID. This is a subfolder to default based on Table name. Namely:
Table Documentation
Default folder for a ‘file’ is Documentation_Files
User ID is [PropertyUUID].[OwnerUUID] e.g: e60a348f
So the whole folder structure would look like:
Documentation_Files /e60a348f/a0c18248.File.174240.pdf.pdf
What actually gets created is:
Documentation_Files_/a0c18248.File.174240.pdf
DocumentURL expression
The reason for using default location is to make it easier to create generate the Document URL for this uploaded file, so the file can be referenced in a catalogue template report.
SWITCH( [FileOrURL],
“File”, CONCATENATE(
“https://www.appsheet.com/template/gettablefileurl”,
“?appName=”, ENCODEURL(CONTEXT(“AppName”)),
“&tableName=”, ENCODEURL(CONTEXT(“Table”)),
“&fileName=”, ENCODEURL([File])
),“Image”, CONCATENATE(
“https://www.appsheet.com/template/gettablefileurl”,
“?appName=”, ENCODEURL(CONTEXT(“AppName”)),
“&tableName=”, ENCODEURL(CONTEXT(“Table”)),
“&fileName=”, ENCODEURL([Image])
),
“”
)
I have tried all manner of combinations of the following expressions for the FILE column and none appear to have worked:
- CONCATENATE("/",[PropertyUUID].[OwnerUUID], “/”)
- CONCATENATE([PropertyUUID].[OwnerUUID], “/”)
- CONCATENATE("/", [PropertyUUID].[OwnerUUID])
- CONCATENATE("/", “Documentation_Files”, “/”,[PropertyUUID].[OwnerUUID])
- CONCATENATE(“Documentation_Files”, “/”,[PropertyUUID].[OwnerUUID], “/”)
Any ideas as to what I am doing wrong?
User | Count |
---|---|
40 | |
35 | |
30 | |
23 | |
17 |