Timers to pause in between steps

I’m looking to have a timer that starts when a user clicks the “Next” button, holds the app for the allotted time set in the trigger, and then continues.

Use case:
I have a PDF that I am creating by “Print-Steps”-ing from Tulip, and then I need to upload it into a Tulip table. When I do the two steps quickly back to back , the uploaded file is corrupted. This is likely because it wasn’t finished being created. It usually takes around 60 to 90 seconds to fully save the PDF to the PC, and then I can upload it.
So, I’d like to put the two steps in 2 different pages and have a timer block the user from moving forward until the PDF is fully printed.

Unless there is a different way to print to PDF and upload all in one go…?

Hi Jon!

I am wondering if you can use some trigger logic to help with this - maybe something that checks that the print is complete before attempting to upload to your table?

Curious if this is possible with your application here.

I’m not sure I know of a trigger function that checks for that. Are there any?

How did you solve to save (print) and then upload automatically?
This seems to be crucial for your issue.

A delay can be built with a custom widget, however this is usually a suboptimal workaround.

@jonp22 My thought was maybe there would be a way to check if the file had finished printing/downloading, and not allowing the print trigger to fire until that condition is met. I tried to play around with this myself, and wasn’t able to find a way to do it sadly. I think since printing is done in the system dialogue, Tulip cannot recognize or track it.

Since the time to print/download is somewhat outside of Tulip’s control - I think trying to create a custom widget timer like @thorsten.langner mentioned above would work.

Another option would be to move the upload step to another part of the process / app, where plenty of time would have elapsed from the print step, guaranteeing successful upload.

Hopefully this helps!

I found an work around! It’s not great, its super clunky but it does what it needs to!

What I did:

  1. Print to PDF. This takes an undetermined amount of time, probably around a minute or two
  2. Place a physical print step after it, where I’m printing something else to paper. Placed before the upload step.
  3. The physical print will not print until the PDF from step 1 is done being created.
  4. Once the physical print is complete, there shouldn’t be an issue uploading the PDF

Like I said, very clunky, but it does the trick.

A timer might still be useful, at the very least to give the user some visual feedback as to what’s happening in the background. But even then, the timer won’t actually know if the PDF is done. The “1 to 2 minutes” would be a guess at best

1 Like

Awesome! I’m glad you found something that works well for your scenario here - agreed that guessing about how long the upload may take is risky, so I like that you found a way to get the system to wait for it to complete first.