Created Attachment file need in record

G_S
Bronze 3
Bronze 3

I am having a invoice application ,I am having a file column with column type File
I am creating a attachment file and saving in drive with default location
I need open that file when i click the file column in application
Suggest any formula for file column way to achieve

1 10 564
10 REPLIES 10

Aurelien
Google Developer Expert
Google Developer Expert

Hi @G_S

Here is the answer

This, in addition:

Enjoy ! Let us know if you are having trouble following these steps

For File column
what formula should i need to use?
what path should I need to set ?
Can you please suggest.

Aurelien
Google Developer Expert
Google Developer Expert

File column, type : File
value is set in the workflow as described in the first link.
Expression can be, for example :
"Invoice" & NOW()

I am get 404 - File or directory not found.

I am using formula for file is
concatenate("/appsheet/data/App ID/Attachments/",[ID]".pdf")

In workflow create file PDF
File folder path i am using the same formula and Prefix as ID column.

3X_8_e_8ef14a425287562ca3bcae0aa153cb1808ab7837.png

Aurelien
Google Developer Expert
Google Developer Expert

I think the situation you described is in the following post from the same thread.

I took a piece of time to describe what I made myself, I hope that will help you.
I went further in the expression to fulfill my purpose, but that does the job:

  1. create action:

    With expression:
"/appsheet/data/yourAppFolder/Files/" & NOW() & ".pdf"
  1. create Workflow, with Workflow rule:
AND(
     [_THISROW_BEFORE].[GeneratePDF_Trigger]<>[_THISROW_AFTER].[GeneratePDF_Trigger],
     [_THISROW_AFTER].[GeneratePDF_Trigger]=false
)
  1. Create task โ€œTask_Write_FileNameโ€ (donโ€™t pay attention to what I wrote myself )
  2. Create Task โ€œTask_GenerateFileโ€ (again, donโ€™t pay attention to what I wrote myself )

    Use this expression in the fileName Prefix
SUBSTITUTE(
     SUBSTITUTE(
          [fileColumn],
          "/appsheet/data/yourAppFolder/Files/",
          "/",
     ),
     ".pdf",
     ""
)

Please remember to disable TimeStamp, as you set it before in the FileName with Task1_WriteFileName.

If that do not work with just following my steps, please pay attention to expression because I simplified it for demonstration purpose, I may have made a mistake.

Still i am getting error 404 ,any other way to obtain this.
Just i need to open that file which we create in workflow in app.

Aurelien
Google Developer Expert
Google Developer Expert

Hi @G_S

I donโ€™t know which further information provide or ask.
Maybe @Rich will have a better lead to explore ?

I tried above steps but i cant get the correct file ,its showing Same 404 error

Aurelien
Google Developer Expert
Google Developer Expert

I got that
Thatโ€™s why I poked @Rich who is, I presume, much more experienced than I am.

Hi @G_S

Just got an idea:
can you click on the Test button and check if the path calculated with the formula match with path expected like if you would go by yourself to pick the file in your Drive subfolders ?

Top Labels in this Space