Refresh / Reload data in a List Block

Hi!

Multiple possible solutions:

  • Simply add a delay in the code + a loading/waiting screen that will be displayed during this delay, easy to do. but this delay will be “static”. => if the PDF is created within 8 seconds, if the delay in the code is set to 10 seconds, your users will lose 2 seconds for nothing. If the pdf is created within 12 seconds they would have waited 10 seconds for nothing.
  • Add a more dynamic delay by playing with window.records or Ajax interceptors
  • The last option is what I would recommend, specifically because the delay you mention is quite long => let your users know it will take some time and let them be free with this.

For the last option, as the delay is long I would not force the user to wait. I would just let them know the pdf will be ready within 12/15 seconds maximum.
Why? Waiting for 10 seconds, even if there is a tip saying “please wait, it will be ready within 10 seconds” is long for any type of user + you force them to wait without having the ability to do anything else.
2 ways to do it:

  1. you just create a waiting page in Softr. The code will be: "When there is an update/create/delete success (I don’t know what is your workflow) =>redirection to the waiting page. In this waiting page there will be just a CTA block (nothing else - no header no footer) with a message saying: “Your pdf will be ready within 12 to 15 seconds, the time we properly gather all data and properly create a fine PDF for you. Feel free to come back whenever you want to check your PDF. If you can’t see your PDF just refresh the page”.
    Below this message the CTA button with a wording like “Understood, go back to the previous page” or whatever is the best. They will click the button, hopefully the pdf will be ready otherwise they know they have to wait and they come back to it whenever they want.

  2. Same as 1. but you will use a full coded alert box or waiting screen to do this (I have one here and here). The message in this alert box will be the same as in 1. and they won’t even have to click anything (the alert box will go away after 3 or 4 seconds)

If you choose the last option and you decide exactly what you want, tell me what is the workflow, what is the block name, I will have time to do it for you here