We have now added a new type of variable: Resource
With this, it is possible to store file locations into a variable.
The problem, in this case, was that the customer wanted a download link to an installation certificate
A Document function was needed to do this, but how to point to the Installation Certificate PDF file?
Since the Doumect function was added to a generic Function block, there was no way to know the file name and path to each created file on every Blippa object…
The solution was to develop the resource variable.
Use it like this:
- Add a variable and choose “resource” as the type.
- Set the limit to PDF (only if you are only going to use this for PDFs, otherwise leave it blank)
- Add the Function “Document”.
- Instead of selecting a file, use “Document from variable” and select the variable you created.
- In the Form that is generating the PDF, go to “Send to”- “Attachment”-"Attach PDF and select the created variable.
Now, the Form will create a PDF and save it to the object files.
Plus update the variable with the path to the PDF file.
…And the Document function will use that path to make the file available for download.
(This comes in handy when generatiing all sorts of certificates, receipts, work orders etc etc.)