Duplicate PDF files being generated with every row update

I have a bot set up to generate a PDF file whenever a certain column value is TRUE. It works fine, but every time anything is changed in the row, the bot is triggered again and a duplicate PDF file is created. The column values being changed are not in the PDF template, so it is always the same exact file. I keep ending up with 3-4 of the same PDF being generated. Is there any way to make it so the PDF is only generated once, only when the trigger value is changed to TRUE?

0 2 190
2 REPLIES 2

Aurelien
Google Developer Expert
Google Developer Expert

Hi @hcampbell

Welcome to the community !

Yes you can do so, you must add a condition on the event (assuming the bot is triggered with an update event)
Itโ€™s like that:

AND(
  [_THISROW_BEFORE].[triggerYesNo]<>[_THISROW_AFTER].[triggerYesNo],
  [_THISROW_AFTER].[triggerYesNo]
)

Note that if [triggerYesNo] is a YesNo type, then
[triggerYesNo] is equivalent to [triggerYesNo]=true

This worked! Thank you! Would never have figured that out on my own.

Top Labels in this Space