Is there a way to conditionally make worksheets

I’m using Airtable and using Plumsail to generate Invoices and packing lists. Sometimes, I want to generate the invoice; sometimes, just the packing list; and other times, both.

One worksheet is my invoice, and the other is the packing list. Is it possible to conditionally add these worksheets based on some logic, or do I need to create 3 separate templates?

Hi @bram.janssen,

You can absolutely work with multiple worksheets! Simply use a placeholder in the name field and then conditionally hide blocks based on your data.

For example, this single template can contain sections for employee information, department information, or both.

Keep in mind that the best approach will depend on your specific design and the information you need to populate. In case you wish to share more information so that we can help you more precisely, you can do so at support@plumsail.com and refer to this topic in the message.

Give it a try and let me know how it works out for you.

Best regards,
Milagros
Plumsail team

Hi @MilagrosBunda, thanks for this. I read through your multiple worksheet section, but to me, it looks more like you can have the multiple worksheet dynamically generated based on an array. Fx multiple linked name will generate multiple worksheets. Which is almost too fancy for what I’m looking for. I have two check boxes: one for invoice and one for packing list.

  • If the Invoice check box is checked, it should export the invoice worksheet.

  • If the packing list check box is checked, it should export the packing list.

  • If both are checked, it should export them both.

Is something like that possible?

Hi @bram.janssen

Unfortunately, exporting a single specific worksheet straight away isn't possible just yet.

If the fully dynamic generation approach doesn't quite fit your scenario, you can try clearing sheets with a condition.This method involves using a flag value in your JSON input data and a hide-block-if condition to simply clear (hide) content that isn’t relevant.

Best regards,
Milagros
Plumsail team

1 Like

OK, great, got it. I think the best way will then probably be for me to make 3 templates and then point to the each specific template based on some airtable logic.