Invoke Appscript Function inside Docs Template which is used to generate PDF from APP Sheet

I have built a Appscript function to convert Amount to Words in the extensions of Doc Template.

This template is being used to generate PDF via automation from App Sheet.

My question is can we invoke this function into Template so as to print the words or do I have to use a Virtual Column for this?

0 3 110
3 REPLIES 3

Steve
Platinum 4
Platinum 4

I am unaware of a way to invoke a script from within a template. I doubt it's possible.

You cannot invoke your function attached to the Doc Template.  But there is a way to do it...have you tried Appscript Tasks?

You will need to copy your container based script into a standalone one and modify it slightly so that your function accepts an input (the Amount) and returns the output back to Appsheet (Words of the amount).

You can then store this value in it's own field on your table and update it's value with a bot whenever you trigger the creation of your PDF.

I wrote a little 'How To' for generating Sequential Numbering which has a similar workflow to the one you will need to set up and you can find that here

Hi, any chance the pdf youโ€™re autogenerating has checkbox fields that correspond with a column in the data set? I havenโ€™t been able to figure out how to achieve this in the template.

Top Labels in this Space