Skip to main content
Question

Force refresh a page after webhook has changed data

  • April 5, 2017
  • 0 replies
  • 58 views

I am using a webhook to update some tasks (ex. task B and C) as complete in a table once a particular task (task A) is marked as complete. So when I mark task A as complete, the page is refreshed and it removes A from the list since it's completed. In the background, the webhook is triggered and it updates B and C as complete. 

However, I still see B and C visible when the page is redirected after I change task A. I believe there is a delay while the webhook is making changes, therefore, I have to refresh the page a second time to see the change. I don't want to have our users refresh the page twice every time they make these updates.

Is there a way to force reload a page in this scenario? Or any other solution that might help here?

Thanks.
This topic has been closed for replies.

  • Quickbase Alumni
  • April 5, 2017
If you are familiar with networking concepts you can think of a webhook as similar to a UDP Packet - it may or may not arrive. If you need a page refresh after some user action you should use script instead as the script can immediately react to user actions.

  • Quickbase Alumni
  • April 6, 2017
If script is not your strength, you can also do this with the current relationships you have.  And using formulas to automatically "complete" sequential tasks.

I know Dan is a master at script and a great advocate for it, but I thought I'd give you another option

  • Quickbase Alumni
  • November 13, 2017
This is a fundamental problem with Webhooks - in the current implementation you can't chain Webhooks together in a reliable way and because they are rate limited you can't even guarantee the initial Webhook will fire in the first place.

But there is an easy solution using script. If you use the API to mark task A as complete you can further process task B and C only after task A's processing is completed. This property of chaining together asynchronous processes is called "thenable". Webhooks are not "thenable" in their current implementation but there are simple ways to make API calls "thenable" (ie chainable) using jQuery or the Fetch API.