history pdf file auto generated

Hello everybody. I have created a bot that generates a pdf file. And then an action to view it via the column containing the link to the file.
The BOT is activated when the various fields are modified or added. However, I would like to keep track of the various versions of the generated file.
The idea I had was to create a special table where all the links to the various files are saved. Has anyone faced this problem before? any advice or guide to consult?

Solved Solved
0 3 169
1 ACCEPTED SOLUTION

The process is surprisingly straightforward:

  • Create your table
    • Date
    • Creator
    • File Link - (defaulted to the (file-path + filename + filetype (.pdf, .csv, .html, etc.)) of your file
    • FileID
        - (In this table you could add any other details you wished to keep track of as well.)
  • Create an action to either:
    • 1) Take you to the File table form, where someone could fill out specifics (if needed); or
    • 2) Create a record in the File table (in the background); or
      • Or skip this... and use any other method you have established for triggering the creation of your file.

  • Create an automation to create your file
    • Event: when a new record in the (Files) table is added
    • 1st task: create the file
      • Folder Path = (the the folder part - of your [File Link] formula)
      • Filename = (the filename part - of your [File Link] formula, minus the filetype extension... just the actual name of the file is all that's needed.)
      •  

-------------------------------------------------------------------------------------------------

Since the default value for the [File Link] is the same as what automation will use... when the record is saved, the file is created, and when the whole process is finished... a user can tap on the "file link" in the app and open the file.

The key is getting the [File Link] formula, and the separated parts of that formula into the correct spaces in the file-creation task in automation; as long as they line up, so the resulting string is the same, the system will find your file.  (^_^)

View solution in original post

3 REPLIES 3

I've done this once in with my previous app.

"The idea I had was to create a special table where all the links to the various files are saved."
You are correct. You just need to create a child table and save the link of the file there.

The process is surprisingly straightforward:

  • Create your table
    • Date
    • Creator
    • File Link - (defaulted to the (file-path + filename + filetype (.pdf, .csv, .html, etc.)) of your file
    • FileID
        - (In this table you could add any other details you wished to keep track of as well.)
  • Create an action to either:
    • 1) Take you to the File table form, where someone could fill out specifics (if needed); or
    • 2) Create a record in the File table (in the background); or
      • Or skip this... and use any other method you have established for triggering the creation of your file.

  • Create an automation to create your file
    • Event: when a new record in the (Files) table is added
    • 1st task: create the file
      • Folder Path = (the the folder part - of your [File Link] formula)
      • Filename = (the filename part - of your [File Link] formula, minus the filetype extension... just the actual name of the file is all that's needed.)
      •  

-------------------------------------------------------------------------------------------------

Since the default value for the [File Link] is the same as what automation will use... when the record is saved, the file is created, and when the whole process is finished... a user can tap on the "file link" in the app and open the file.

The key is getting the [File Link] formula, and the separated parts of that formula into the correct spaces in the file-creation task in automation; as long as they line up, so the resulting string is the same, the system will find your file.  (^_^)

As usual, you da man! 

Very much appreciated!

Top Labels in this Space